simple xml question

D

Dan Henderson

I have one xml document that includes a second xml document within a pair of
tags. The second document also has the xml declaration <xml version="1.0"
?>. Is this OK, or do I need to remove the declaration from the second xml
document?
 
M

Micah Cowan

Dan Henderson said:
I have one xml document that includes a second xml document within a pair of
tags. The second document also has the xml declaration <xml version="1.0"
?>. Is this OK, or do I need to remove the declaration from the second xml
document?

The above is not an xml declaration; nor is it a valid tag. If
you meant, <?xml version="1.0"?>, then the answer to your
question is: it is not OK, you need to remove the declaration
from the "second xml document", otherwise you do not have
well-formed XML.

-Micah
 
A

Andy Fish

you could store the whole child document in a CDATA section but then you
would not really be storing it as XML, just a blob which happened to be XML
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top