|
|
XmlSlurper().parseText(String)
Hi,
I am using below code for parsing string to xml.
def x = new XmlSlurper().parseText(String)
The string value is quot;amp;#number forty five and semicolonquot;
After parsing the value changed to quot;-quot;
Is there any way that I can get the original value after parsing?
Regards,
Prasad
I don't understand. If the XML contains the string '#38;#45;', then surely you want to see that as a '-'? Anyway, I'm afraid I don't know of a way to configure the parser not to automatically translate entities like that. If there is a way, it almost certainly involves configuring the underlying parser rather than XmlSlurper. |
|