Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML within XML

 
Gitanjali Magani
Greenhorn
Posts: 3
  • 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
  • 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
Posts: 42967
73
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic