I'm trying to parse an XML file in NAV which has < and > characters instead of < and > as element definition. I'm accessing the file through a web service. Problem is that I can't access those elements because they're interpreted as text and not as valid XML elements. Any ideas?
0
Comments
I xml consists of: if I is the case then you ought to parse > and < with a function and return > or <.
II xml consists of IF II is the case, then it's not a valid xml file, and no webservice will know what the elements are and what not.
< and > are meant to replace < and > in the file when they are not a part of the element because else an xml could be parsed incorrectly because < and > are inherent to an element. without these characters you have no xml-file.
|To-Increase|
Content of the SOAP message is treated as plain text (> instead <) so my way around that problem was to use XmlDoc.text method to get the data.
XmlHTTP is defined as 'Microsoft XML, v6.0'.XMLHTTP
XmlDoc is defined as 'Microsoft XML, v6.0'.DOMDocument60
The code for getting data from SOAP is: I added dummy top level node <Return> just in case so that the XML inside SOAP message is correct (in case it hasn't top level node).
The problem is that the XmlDoc.text apparently doesn't handle long strings so I can't get the SOAP message data out of the XmlHTTP response.
BigText can't solve that problem because it's not the problem in storing text into a variable.
Anybody has any other idea we could try?
send request:
vars: