xml linefeed at end tag

forum.advanced.programming (1998-2005)
Enrico

xml linefeed at end tag

Post by Enrico » 22 Mar 2005, 19:27

 Posted by:  Enrico 

Hello

I use Ms Xml 4.0 to create a xml file.
If I open my file with text editor ( wordpad ) all my file is on only one
line.
If I open my file with xml editor ( or internet explorer ) my file is Ok.

How I can "format" my xml file with line feed at end tag?

Thanking

StefanM
Germany
Posts: 667
Joined: 10 Aug 2018, 15:57
Location: Bavaria

xml linefeed at end tag

Post by StefanM » 02 Apr 2005, 20:04

 Posted by:  Stefan Misch 

Enrico,

an XML editor or IE is recognizes the structure of an XML document. This has
nothing to do with linefeeds or indentation using spaces or tabs.

There is a property "preserveWhiteSpace" which can be set to TRUE/FALSE when
loading an XML document from a file. But if you construct your XML document
using the DOM-methods then you have no control where there should be any
linefeeds or spaces/tabs for indentation. Regarding the DOM this is not even
neccessary, because the structure of the XML document is given by the tag
sequence and not by a human-readable format.

If you need more information, please see (link maybe broken because of line
length limitation)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmconControllingWhiteSpacewiththeDOM.asp

HTH,
Stefan

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests