Meaningless Drivel is fun!
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 Java Interview Guide this week in the Jobs Discussion 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: 8927

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: 42965
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.
I agree. Here's the link:
subject: XML within XML
It's not a secret anymore!