Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML to TXT

From: "Pete Delgado" <Peter.Delgado@------.--->
To: NULL
Date: 10/28/2009 3:34:00 PM
"Martin Honnen" <mahotrash@y...> wrote in message 
news:emzQ7MkTKHA.4408@T......
> Tom Woods wrote:
>> Sorry for being so vague.  What I would like to do is to read the 
>> XmlDocument line by line and add each line into a memo field.
>>
>> When I use the InnerXml, it's just one long string with no CR/LF.
>>
>> Can this be done?
>
> The XML APIs don't expose XML line by line, rather they expose nodes.
> But you can of course use the normal file IO APIs to read line by line.
>
> And if InnerXml does not give you what you want then you might simply want 
> to set PreserveWhitespace to true before you load your XML document:
>
>   XmlDocument doc = new XmlDocument();
>   doc.PreserveWhitespace = true;
>   doc.Load("file.xml");
>   // now doc.OuterXml/InnerXml has any white space the original document 
> contains
>

Wouldn't it be far better and simpler to use XSLT to transform the XML into 
the appropriate format?

-Pete




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent