[Expat-discuss] problem parsing two files in application

Karl Waclawek karl at waclawek.net
Mon May 26 20:45:12 EDT 2003


Which version of Expat? Please post your code (trimmed down to the essentials).

Karl

----- Original Message ----- 
From: "Greg Martin" <Greg.Martin at TELUS.COM>
To: <expat-discuss at libexpat.org>
Sent: Monday, May 26, 2003 5:32 PM
Subject: [Expat-discuss] problem parsing two files in application


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.



_______________________________________________
Expat-discuss mailing list
Expat-discuss at libexpat.org
http://mail.libexpat.org/mailman/listinfo/expat-discuss




More information about the Expat-discuss mailing list