Tim Anderson Posted July 20, 2012 Posted July 20, 2012 I am finding that when the XML contains an ampersand in the data ( e.g. <Label>David & Charles</Label> ) then the XPath Parse function returns ERROR. Is there any way to tweak the XPATH Parse code to get round this? I am already defying the inputstream to UTF=8 Thanks
beverly Posted July 21, 2012 Posted July 21, 2012 Can you pre-process the source XML so that the "&" becomes "&"?
Tim Anderson Posted July 22, 2012 Author Posted July 22, 2012 Hi Beverly Done some checking and I was using the XML returned from a web tool to test parsing, but I will be using a ScriptMaster routine to get the XML in the solution - the ScriptMaster module is returning & so this was a non-issue! Thanks anyway Tim
john renfrew Posted July 22, 2012 Posted July 22, 2012 Tim What about XMlSlurper functionality built into Groovy to get the data if you know the structure?
Tim Anderson Posted July 24, 2012 Author Posted July 24, 2012 John, The XPath Parse function works perfectly with the code returned from the ScriptMaster function, but not from the MWS Scratchpad! Tim
Recommended Posts
This topic is 4573 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now