[Expat-discuss] problem parsing two files in application
Greg Martin
Greg.Martin at TELUS.COM
Mon May 26 15:32:52 EDT 2003
I'm getting the error : "junk after document element". I've looked through archives and see it usually comes up when there are multiple roots or text after the root element. I don't think this is the case here. I'm parsing two files each with different definitions - the first parses fine but it
doesn't seem to matter what I take out of the second it doesn't parse. I did see mention in the archives of a problem parsing subsequent XML files delivered by socket - here they are read off disk. Here is the second file :
<?xml version="1.0"?>
<!DOCTYPE apptasks[
<!ELEMENT send_ani_dnis_name EMPTY>
<!ELEMENT send_iscp_params EMPTY>
<!ELEMENT return_itag_params EMPTY>
<!ELEMENT task (send_ani_dnis_name?, send_iscp_params?, return_itag_params?)>
<!ATTLIST task task_id NMTOKEN #REQUIRED>
]>
<apptasks>
<task task_id="101">
<send_ani_dnis_name/>
</task>
<task task_id="102">
<send_iscp_params/>
</task>
<task task_id="103">
<send_iscp_params/>
<return_itag_params/>
</task>
</apptasks>
I'm calling XML_ParserFree() after parsing the first file and XML_ParserCreate() before. The parsing of both files is done in the same thread but in a different scope using C++ (C version of expat I believe).
TIA,
Greg Martin 780-493-2786
Application Development
TP&E - Service Solution
TELUS Communication Inc.
More information about the Expat-discuss
mailing list