473,396 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 743

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

Similar topics

5
by: John Bailo | last post by:
I wrote a webservice to output a report file. The fields of the report are formatted based on information in an in-memory XmlDocument. As each row of a SqlDataReader are looped through, a...
1
by: Colin Green | last post by:
Hi I wonder if anyone has any ideas about this... I am dumping the contents of an XmlDocument into a RichTextBox so the user can see the raw XML. I use a line of code something like this to lado...
2
by: | last post by:
How do I read the attributes of this XML? I have a page with text boxes that i want to read these values in. notice there are 2 Parameter tags with the same attributes. Code would help ...
0
by: Sonu Kapoor | last post by:
I tried the code and it works without any probs. The prob must be in your network. Maybe you have to reconfigure your Firwall. Sonu http://weblogs.asp.net/sonukapoor/ >-----Original...
2
by: Lupina | last post by:
Hi I want load whole xml file, I try do it in the same way as I did it in windows application. try { XmlDocument myDoc = new XmlDocument();
2
by: Glenn Venzke | last post by:
I have an XMLDocument object that is attempting to parse an xml document generated by a cold fusion page. The problem is that for some reason the cold fusion page is generating a number of carriage...
2
by: John Smith | last post by:
I'm writing webervice client using .Net 2.0. I have this class: public class MyWebService : SoapHttpClientProtocol { public XmlDocument validate(string url, XmlDocument xmlDocument) {...
1
by: Tom | last post by:
I am on .NET 2.0 and am trying to serialize an object to an XmlDocument (or a string which I can then create an XmlDocument from). What I have so far is (User is my class); XmlSerializer x =...
2
by: Phil Galey | last post by:
I'm using the followg code to add the attribute overwrite='true" to a select list of XML tags in an XML document. The document is loaded from a file and just the tags with names matching what's in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.