"Michael J. Lanham" <[EMAIL PROTECTED]> writes: > trying to parse the content.xml file from an OpenOffice.org zip > archive created by openoffice writer program. keep getting this > error Message: An exception occured! Type:RuntimeException, > Message:Could not open DTD file > '/.automount/netapp0/export/homes02/mlanham/tmp/office.dtd' > An error occured during parsing > > has anyone else had success parsing the content.xml file? > how did you do it? > > the offending line in the xml file looks like this: > <!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD > OfficeDocument > 1.0//EN" "office.dtd">
It seems like your system is mapping the openoffice public identifier to a file that doesn't exist on your system (the .../mlanham/tmp/office.dtd looks suspicious). > I tried turning validation in Xerces-C off but that did not seem to help You'll have to remove the whole DOCTYPE. If there's a dtd listed, xerces *has* to open it. Otherwise, you can simply put a simlink to the DTD directory in your working directory and modify the SYSTEM name to match: ln -s /path/to/office/dtd/ ~/dtd <!DOCTYPE office:document-content SYSTEM "dtd/office.dtd"> The OOo DTD is modular, so it includes a lot of other files in the same directory. HTH, jas. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
