Page 1 of 1

XML Parsing Error

Posted: Wed May 12, 2010 9:37 pm
by jwbuzz
I'm using Revolution to communicate with a web service. I'm receiving an XML error (see attached screenshot). It's a pretty simple xml string, so it's not evident to me what the problem is. Any suggestions?
Screen shot 2010-05-12 at 3.32.35 PM.png
Screen shot 2010-05-12 at 3.32.35 PM.png (17.36 KiB) Viewed 2813 times
The XML is as follows:

<?xml version="1.0" encoding="utf-8"?>
<data/>


Here is the code snippet that processes it:

Code: Select all

 put revCreateXMLTree(theWebPageContent,true,true,false) into tTree
      if tTree is not an integer then
        answer error "Failed to process response with error " & tTree
      else
        put revXMLNodeContents(tTree,"data/message/messagetype") into tContents
      answer tContents
      end if

Re: XML Parsing Error

Posted: Wed May 12, 2010 10:17 pm
by Curry
First try validating your XML with another program (Internet Explorer, W3 validator, or etc.) and make sure that is well-formed.

Edit: Oh, I see your XML is listed.

Re: XML Parsing Error

Posted: Thu May 13, 2010 4:58 pm
by jwbuzz
This turned out to be a simple typo.. I was passing theWebPageContent to the xml parser when I should have been passing tWebPageContent. Hopefully this will help someone in the future avoid the simple mistake.