Groups | Blog | Home
all groups > dotnet xml > january 2005 >

dotnet xml : Xml fragment in XML document


Chris Fink
1/20/2005 1:17:52 PM
How do I make this well formed?

<?xml version='1.0'?>
<xmlvalidationrequest>
<xml>
<?xml version='1.0'?><test>basic xml fragment<test>
</xml>
<status>True</status>
<errormessage><errormessage>
</xmlvalidationrequest>

Bruce Wood
1/20/2005 1:18:12 PM
You really have no choice but to strip the <?xml version='1.0'?>
directive from the beginning of the XML that you're sending within the
<xml> tag.

The only alternative I could think of is to wrap the contents of the
<xml> tag in a CDATA section, but this won't work if the XML you're
validating contains a CDATA section itself.
AddThis Social Bookmark Button