Hey all,
I using a SAX2 parser to try to parse the following XML, and it is giving me
a FatalError in parsing that
The element type "JobDescription" must be terminated by the matching end-tag
"</JobDescription>".:
I have shown the full stack trace below the XML doc. Now if you look at the
JobDescription element, I tried another test, removing the '�' characters,
and the parsing worked. I just checked the specification, and the '&'
character falls into the Char legal character set. It appears that this is
a bug, either in Char testing, and/or in the CDATA section parsing. Can
someone confirm this? Any help is *greatly* appreciated on this one, as
this is an urgent one...(hopefully I am missing something simple). I have
also attached the xml and dtd files.
Thanks much!
BradO
XML doc:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JobFeed SYSTEM "JobFeed.dtd">
<JobFeed FeedSourceCode="ORL" FeedCreationDate="04/16/2001">
<CompleteFeed>
<JobAdTRX-Save JobAdCode="10327757">
<PublicationDate>04/01/2001</PublicationDate>
<ExpirationDate>04/28/2001</ExpirationDate>
<CompanyCode>162474</CompanyCode>
<CompanyName/>
<ContactEmail/>
<ApplyURL/>
<OriginalURL/>
<JobType/>
<AnnualSalary/>
<JobTitle><![CDATA[]]></JobTitle>
<SearchDescription>DRIVERSLABORERSCHECKERS?ForCoinPortEvergladesGoodW</Searc
hDescription>
<JobDescription><![CDATA[DRIVERS/LABORERS & CHECKERS - For Co in Port
Everglades. Good Wages, Benefits & 401K. CALL ��954-764-8988
�� ]]></JobDescription>
<JobDestinationList>
<JobDestination>
<DestinationCode/>
</JobDestination>
</JobDestinationList>
<JobCategoryAliasList><![CDATA[DRIVERS/LABORERS &
CHECKERS - ]]></JobCategoryAliasList>
<JobLocationList>
<JobLocation>
<DomesticLocation>
<RegionCode/>
<Address1/>
<Address2/>
<City/>
<StateProvince/>
<PostalCode/>
<Country/>
</DomesticLocation>
</JobLocation>
</JobLocationList>
</JobAdTRX-Save>
</CompleteFeed>
</JobFeed>
Stack trace:
org.xml.sax.SAXParseException: The element type "JobDescription" must be
terminated by the matching end-tag "</JobDescription>".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:969)
at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
ntScanner.java:634)
at
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne
r.java:683)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1187)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JobFeed SYSTEM "JobFeed.dtd">
<JobFeed FeedSourceCode="ORL" FeedCreationDate="04/16/2001">
<CompleteFeed>
<JobAdTRX-Save JobAdCode="10327757">
<PublicationDate>04/01/2001</PublicationDate>
<ExpirationDate>04/28/2001</ExpirationDate>
<CompanyCode>162474</CompanyCode>
<CompanyName/>
<ContactEmail/>
<ApplyURL/>
<OriginalURL/>
<JobType/>
<AnnualSalary/>
<JobTitle><![CDATA[]]></JobTitle>
<SearchDescription>DRIVERSLABORERSCHECKERS?ForCoinPortEvergladesGoodW</SearchDescription>
<JobDescription><![CDATA[DRIVERS/LABORERS & CHECKERS - For Co in Port Everglades. Good Wages, Benefits & 401K. CALL ��954-764-8988 �� ]]></JobDescription>
<JobDestinationList>
<JobDestination>
<DestinationCode/>
</JobDestination>
</JobDestinationList>
<JobCategoryAliasList><![CDATA[DRIVERS/LABORERS & CHECKERS - ]]></JobCategoryAliasList>
<JobLocationList>
<JobLocation>
<DomesticLocation>
<RegionCode/>
<Address1/>
<Address2/>
<City/>
<StateProvince/>
<PostalCode/>
<Country/>
</DomesticLocation>
</JobLocation>
</JobLocationList>
</JobAdTRX-Save>
</CompleteFeed>
</JobFeed>
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Bradley O'Hearne (private) -->
<!--CareerBuilder JobFeed DTD-->
<!ELEMENT JobFeed ((CompleteFeed | IncrementalFeed))>
<!ELEMENT CompleteFeed (JobAdTRX-Save+)>
<!ELEMENT IncrementalFeed (JobAdTRX-Save | JobAdTRX-Delete)+>
<!ELEMENT JobAdTRX-Save (PublicationDate?, ExpirationDate?, CompanyCode?, CompanyName?, ContactEmail?, ApplyURL?, OriginalURL?, JobType?, AnnualSalary?, JobTitle?, SearchDescription?, JobDescription, JobDestinationList?, (JobCategoryList | JobCategoryAliasList)?, JobLocationList?)>
<!ELEMENT JobAdTRX-Delete (#PCDATA)>
<!ELEMENT PublicationDate (#PCDATA)>
<!ELEMENT ExpirationDate (#PCDATA)>
<!ELEMENT CompanyCode (#PCDATA)>
<!ELEMENT CompanyName (#PCDATA)>
<!ELEMENT ContactEmail (#PCDATA)>
<!ELEMENT ApplyURL (#PCDATA)>
<!ELEMENT OriginalURL (#PCDATA)>
<!ELEMENT JobType (#PCDATA)>
<!ELEMENT AnnualSalary (#PCDATA)>
<!ELEMENT JobTitle (#PCDATA)>
<!ELEMENT SearchDescription (#PCDATA)>
<!ELEMENT JobDescription (#PCDATA)>
<!ELEMENT JobDestinationList (JobDestination+)>
<!ELEMENT JobDestination (DestinationCode)>
<!ELEMENT DestinationCode (#PCDATA)>
<!ELEMENT JobCategoryList (JobCategory+)>
<!ELEMENT JobCategoryAliasList (#PCDATA)>
<!ELEMENT JobCategory (CategoryCode)>
<!ELEMENT CategoryCode (#PCDATA)>
<!ELEMENT JobLocationList (JobLocation+)>
<!ELEMENT JobLocation (DomesticLocation | InternationalLocation)>
<!ELEMENT DomesticLocation (RegionCode, Address1?, Address2?, City?, StateProvince?, PostalCode, Country?)>
<!ELEMENT InternationalLocation (RegionCode, Address1?, Address2?, City?, StateProvince?, PostalCode?, Country?)>
<!ELEMENT RegionCode (#PCDATA)>
<!ELEMENT Address1 (#PCDATA)>
<!ELEMENT Address2 (#PCDATA)>
<!ELEMENT City (#PCDATA)>
<!ELEMENT StateProvince (#PCDATA)>
<!ELEMENT PostalCode (#PCDATA)>
<!ELEMENT Country (#PCDATA)>
<!ATTLIST JobFeed
FeedSourceCode ID #REQUIRED
FeedCreationDate CDATA #REQUIRED
>
<!ATTLIST JobAdTRX-Save
JobAdCode CDATA #REQUIRED
>
<!ATTLIST JobAdTRX-Delete
JobAdCode CDATA #REQUIRED
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]