469,613 Members | 2,180 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

XmlDocument - End tag moved to next line

I use XmlDocument to load and save the XML document...

While i save the document end tag of elements with blank value is moved to next line..

i.e.
<root>
<element1>some text</element1>
<element2>123566</element2>
<element3></element3>
<element4></element4>
</root>

when above document is loaded and saved back, it looks like below
<root>
<element1>some text</element1>
<element2>123566</element2>
<element3>
</element3>
<element4>
</element4>
</root>
(End tags of element3 and elemtn4 are moved to next line)

This causes error in my schema as element3 and element4 has invalid character(in schema we have defined, it must have valid value, blank space is invalid)

XML file is generated via code so - i can’t change <element4></element4> to <element4/> to avoid above problem...

Please can help me how to handle this..

Cheers
Venu
Jan 11 '08 #1
0 691

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Colin Green | last post: by
2 posts views Thread by | last post: by
2 posts views Thread by Lupina | last post: by
2 posts views Thread by Glenn Venzke | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.