logo       

I am currently having a problem with entities in a DOM Parser: msg#00006

Subject: I am currently having a problem with entities in a DOM Parser

Code:

                        domParser.setFeature(“http://apache.org/xml/features/validation/schema”, false);

                        domParser.setFeature(“http://apache.org/xml/features/dom/create-entity-ref-nodes”, false);

 

With this configuration, and using Xerces 2.2.1, anytime the parser encounters an entity that is not defined in the DTD, we get the following results:

Input:                properly elected to do so, can amend its &bogus; Federal income tax returns filed

Output:             Federal income tax returns filed

 

Ran a test with a newer version of Xerces (2.6.0) and got a slightly different result:

Input:                properly elected to do so, can amend its &bogus; Federal income tax returns filed

Output:             properly elected to do so, can amend its  Federal income tax returns filed

 

In either case, this is not a good thing.

 

I am looking for method that would allow me to keep the above features set the way they are, but code a method that would allow me identify an undefined entity in the data.

 

I am also curious why the Xerces code would not throw an exception when the above data is encountered. I am will to go to 2.8.0 Xerces if this problem was addressed.

 

Let me re-state, I want the code to throw an exception!!!!

 

Please let me know if there are any questions.

 

Dave

 

David B. Crain
Consultant Software Engineer
Editorial & Conversion Systems
Lexis-Nexis
Phone: 937-865-6800 ext. 56303

 

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe