Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-12

DOM stumbles upon DOCTYPE

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

I'm trying to use the unit located inn

fpc-2.0.4/fcl/xml/dom.pp

to parse files starting like this (shortened):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE office:document-meta PUBLIC "-//OpenOffice.org//DTD OfficeDocument ... <office:document-meta xmlns:office="http://openoffice.org/2000/office" ... <office:meta>
<meta:generator>OpenOffice.org 1.1.3 (FreeBSD)</meta:generator> ...

but the second line naming the document type makes the parser throw an exception.

Is this an implementation issue (i.e. ToDo) or do I only have two twiddle the right knob and which one is it?

TIA,
Marc

Reply by email

Marco van de Voort
to Marc Santhoff
Show quoted text 18 lines
I'm trying to use the unit located inn fpc-2.0.4/fcl/xml/dom.pp to parse files starting like this (shortened): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE office:document-meta PUBLIC "-//OpenOffice.org//DTD OfficeDocument ... <office:document-meta xmlns:office="http://openoffice.org/2000/office" ... <office:meta> <meta:generator>OpenOffice.org 1.1.3 (FreeBSD)</meta:generator> ... but the second line naming the document type makes the parser throw an exception. Is this an implementation issue (i.e. ToDo) or do I only have two twiddle the right knob and which one is it?

There were quite some post 2.0.4 fixes to these units. Please first try a newer version (even if you can only use 2.0.4 for some reason).

Reply by email

Marc Santhoff
to Marco van de Voort
Marco van de Voort wrote 21 lines
> I'm trying to use the unit located inn > > fpc-2.0.4/fcl/xml/dom.pp > > to parse files starting like this (shortened): > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE office:document-meta PUBLIC "-//OpenOffice.org//DTD OfficeDocument ... > <office:document-meta xmlns:office="http://openoffice.org/2000/office" ... > <office:meta> > <meta:generator>OpenOffice.org 1.1.3 (FreeBSD)</meta:generator> > ... > > but the second line naming the document type makes the parser throw an > exception. > > Is this an implementation issue (i.e. ToDo) or do I only have two > twiddle the right knob and which one is it? There were quite some post 2.0.4 fixes to these units. Please first try a newer version (even if you can only use 2.0.4 for some reason).

That doesn't work. Injecting the sources produces masses of errors from makefile conflicts to missing or unknown functions and syntactical differences.

I'll filter the line out in code.

Thank you anyways,
Marc

Reply by email