2

I will parse xml file (this peace of file):

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE dblp SYSTEM "./resource/init/dblp.dtd">
<dblp>
<www mdate="2002-01-03" key="www/fr/ardentsoftware">
<title>Ardent Software</title>
<url>http://www.ardentsoftware.fr</url>
</www>
.
.
.
.
</dblp>

with vtd-xml , but I had this exception : com.ximpleware.extended.EntityExceptionHuge: Errors in Entity: Illegal entity char which mean that my file contain "entities" ,so how can I make vtd-xml ignore validation file to make a perssing correctly .

        VTDGenHuge vg = new VTDGenHuge();
        XMLMemMappedBuffer xb = new XMLMemMappedBuffer();
        try{
        xb.readFile("./resource/init/dblp.xml");
        vg.setDoc(xb);
        vg.parse(false);
        VTDNavHuge vnh = vg.getNav();

Thanks

Pheonix
  • 161
  • 3
  • 14

1 Answers1

0

The VTDGenHuge parser throws this error for the simple reason that your XML file contains invalid entity references... correct the error and it should work fine

vtd-xml-author
  • 3,319
  • 4
  • 22
  • 30