We use XML and DOM all the time and have found that you want to strip
the initial <?xml ..> line to get it to work...
so if you try working with WELL-FORMED XML, you'll be just fine, like
this
<events>
<event>
<name>ABC Event</name>
<location>Whistler, BC</location>
<date>May 26th</date>
</event>
</events>
but not with this
<?xml version="1.0" encoding="ISO-8859-1"?>
<events>
<event>
<name>ABC Event</name>
<location>Whistler, BC</location>
<date>May 26th</date>
</event>
</events>
Also check to make sure that there aren't encoding issues. E.g., is it
coming across as
<events> ....
or
<events> ....
Normally we don't have any encoding issue with @url and xml retrieval,
however
On Nov 16, 2007, at 3:06 PM, MC Tay wrote:
HI:
This is my first attempt to use the DOM and XML in Witango and I
need some helps.
I'm trying to retrieve some XML data by calling the testxml.taf file
from testgetxml.taf file. I'm not sure why it fails to parse the XML
in the testgetxml.taf.
In the testxml.taf, I have:
--------------------------------------
<@ASSIGN NAME="myDom" SCOPE="request"
VALUE="<@DOM VALUE='<?xml version="1.0" encoding="ISO-8859-1"?>
<events>
<event>
<name>ABC Event</name>
<location>Whistler, BC</location>
<date>May 26th</date>
</event>
</events>
'>">
In the testgetxml.taf, I have:
----------------------------------------------
<@ASSIGN NAME="getmyDom" SCOPE="local" VALUE="<@URL
LOCATION='http://................/testxml.taf'>">
<@ASSIGN NAME="myDom" SCOPE="request" VALUE="<@DOM VALUE='<@VAR
NAME="getmyDom" SCOPE="LOCAL">'>">
When I try to execute testgetxml.taf, I got the error below in
testgetxml.taf
An error occurred while parsing the XML.
Invalid document structure
However, I did check that <@VAR NAME="getmyDom" SCOPE="LOCAL"> does
return the right string below to testgetxml.taf:
<events> <event> <name>ABC Event</name> <location>Whistler, BC</
location> <date>May 26th</date> </event> </events>
Not sure why it didn't parse the XML. Any help will be much
appreciated.
Thanks!
MC
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--------------
Dale Graham,PhD
Technical Manager, NIDB
Custom Applications Branch, DECA, NIH
[EMAIL PROTECTED]
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf