Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JDOM and external entities

Thread Tools

JDOM and external entities

Posts: n/a
Ok, I really tried hard to find a solution by myself, but now it's
late, I'm tired and I still need help!

I need to modify a DocBook file with several other XML files included
as an ENTITY reference. Like
<!ENTITY file1 SYSTEM "file1.xml">
<!ENTITY file2 SYSTEM "file2.xml">
<!ENTITY file3 SYSTEM "file3.xml">
JDOM's normal behaviour is to build this document with all entities
expanded. But how will I save the individual files after modification?
That's why I turned of entity expansion with setExpandEntities(false)
and build each file as a separate document. Now I am faced with the
fact, that some of those external XML files contain itself some of
those entity references declared in my root document. But without the
declaration I get a "Entity ... referenced, but not declared" error.
How should I handle this?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.NoSuchMethodError: org.jdom.Element: method getParent()Lorg/jdom/Element Tinker Java 4 10-09-2005 03:12 PM
JDOM and external entities Tom XML 0 09-10-2005 08:25 AM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger Java 4 06-21-2004 09:08 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger XML 3 06-21-2004 09:08 PM
Help with JDOM, turn org.jdom.Document -> org.w3c.dom.Document? Wendy S Java 1 08-04-2003 11:48 PM