|
Hi,
I am encountering some problems
in refering external entities from an xml file using Xerces C++ parser version
1.7.0. I am working with Windows NT. The problems are described
below,-
In the refered.xml there is
an element refered-elem. From the refering.xml I am
referring to this element as
<pls>&refered-elem;</pls>
and I have declared this entity in
testref.dtd (refered.xml refers to this DTD)
as
<!ENTITY refered-elem SYSTEM
"refered.xml">
refered.xml and
refering.xml are located under the same directory in the local
file system. When I am running the Xerces java parser with these files I'm
getting the expected output. But when I run the Xerces C++ parser through
SAX2Count.cpp (provided as a sample with the downloaded
parser), I am getting the following error,-
Fatal Error at file
E:\Arindam\CPPTests\xerces-c-src1_7_0\xerces-c-src1_7_0\Build\Win32\VC6\Release\refered.xml,
line 2, char 2 Seems that it can't recognize the document type definition <!DOCTYPE refered-elem SYSTEM "testref1.dtd">. One point to note here is that we really don't need any DTD for refered.xml . If I remove this DOCTYPE line from refered.xml, it works fine with the java parser. But with the C++ parser it gives the following errors,- Error at file
E:\Arindam\CPPTests\xerces-c-src1_7_0\xerces-c-src1_7_0\Build\Win32\VC6\Release\refered.xml,
line 3, char 15
Seems that the parser is looking for a DTD for refered.xml. Any suggestion to solve this will be very much welcome. Thanks and Regards, Arindam Chandra Software Professional
|
BEGIN:VCARD VERSION:2.1 N:Somashekar;Vishwanath;K FN:Vishwanath K Somashekar ORG:Ushacomm;Product Dev - R & D TEL;WORK;VOICE:91-80-5271851 TEL;HOME;VOICE:91-80-6645585, 6530588 ADR;WORK:;;;Bangalore;;560 008;India LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Bangalore 560 008=0D=0AIndia ADR;HOME:;;;Bangalore;;560 078;India LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Bangalore 560 078=0D=0AIndia EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020615T125758Z END:VCARD
testref1.dtd
Description: Binary data<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE web-app SYSTEM "testref.dtd"> <web-app xmlns:tt="http://www.oreilly.com/catalog/javaxml"> <servlet ab="xyz"> <servlet-name>ajsv</servlet-name> <tt:test>aa</tt:test> <servlet-class>BookStoreServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>asxvj</servlet-name> <url-pattern>shjcxvsj</url-pattern> </servlet-mapping> <pls>&refered-elem;</pls> </web-app>
testref.dtd
Description: Binary data<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE web-app SYSTEM "testref1.dtd"> <refered-elem>abcd</refered-elem>
SAX2CountHandlers.hpp
Description: Binary data
SAX2Count.hpp
Description: Binary data
SAX2CountHandlers.cpp
Description: Binary data
SAX2Count.cpp
Description: Binary data--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
