473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

JDOM and external entities

Tom
I need to modify a DocBook file with several other XML files included
as an ENTITY reference. Like

<!DOCTYPE book SYSTEM "PathToMyDTD" [
<!ENTITY file1 SYSTEM "file1.xml">
<!ENTITY file2 SYSTEM "file2.xml">
<!ENTITY file3 SYSTEM "file3.xml">
]>
<book>
&file1;
&file2;
&file3;
</book>

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?

__
Tom

Sep 10 '05 #1
0 1114

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Praveen Chhangani | last post by:
Folks, I was wondering if it were possible to convert an org.jdom.doc to an org.w3c.doc document. Essentially what I have is an already parsed document using jdom and I would like to use the...
11
by: Douglas Reith | last post by:
Hi There, Can someone please tell me why the XML spec states that an attribute value with an external entity is forbidden? Or point me to the appropriate document? Or better still, perhaps you...
3
by: Michael | last post by:
hello, I'm a java programmer, and my program will require to parse XML documents and extract data from it, then built a new XML document. Should JDOM or Xerces be the best for me? Please help....
3
by: Bernd Oninger | last post by:
When I run the successfully compiled java source shown at the end I got a runtime error: Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/Content Where is the missing class ?...
3
by: shawn modersohn | last post by:
I got, <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Insert GPL copyright notice here --> <!-- <?xml-stylesheet type="text/css" href="exhibits.css"?> --> <!DOCTYPE exhibits PUBLIC...
0
by: Tom | last post by:
When I build a JDOM document containing something like <glyph unicode="&#xe041;" glyph-name="A"> then this unicode attribute value is not preserved (maybe resolved or escaped?). I create such a...
4
by: Vijay Anandh | last post by:
Hi All, I am new to JDOM and I am currently coding a program to build xml files using JDOM. The size of the xml file which i am goin to build will be in the order of a few GB's( 1 to 5 GB)....
0
by: idorjee | last post by:
Hi Can anyone please help me why my java program says the following when I try to build it in NetBeans: Compiling 1 source file to /Users/Desktop/Jproject/jdom/build/classes...
1
Dormilich
by: Dormilich | last post by:
Hi, I got a strange behaviour (FF 3) of entities in my xml files. I have an element (see xml listing), where the attribute/content contains a latin1 entity (&ouml;), but FF throws an error...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.