File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XML within XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML within XML" Watch "XML within XML" New topic

XML within XML

Gitanjali Magani

Joined: Oct 21, 2005
Posts: 3

How can I include an XML [Having same dtd] into another XML.

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

Not sure about youre question. Are you asking how to refer to DTD in a XML document or how to include an external XML file in a XML file.

For first one

For 2nd one use XInclude.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41029
If you don't need to mix elements (i.e., the included XML is just a text blob to the including XML), use a CDATA section.

If you need to access elements of both at the same time, give each a namespace. As suggested, XInclude can help as well.

Ping & DNS - my free Android networking tools app
subject: XML within XML
Similar Threads
making XML Doc from JDBC Results
Ajax Jqery xml response - not able to read response
Castor Mapping
iText problem with html-table to pdf
Pronounciation of "Buzz Words"