File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML within XML" Watch "XML within XML" New topic
Author

XML within XML

Gitanjali Magani
Greenhorn

Joined: Oct 21, 2005
Posts: 3
Hi,

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

Thanks,
Gita
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.


Groovy
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
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: http://aspose.com/file-tools
 
subject: XML within XML
 
It's not a secret anymore!