File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML within XML

 
Gitanjali Magani
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks,
Gita
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic