Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save XML with DOMDocument40... but with "CRLf"

Status
Not open for further replies.

ThomasMatelart

Programmer
Apr 17, 2001
14
BE
Hello,
I built a complete xml with MSXML2 objetcs (DOMDocument40, IXMLDomElement, ...)

---------------------------------------------------------

Set XMLDoc = New MSXML2.DOMDocument40
XMLDoc.async = False
XMLDoc.Load ("<?xml version='1.0' encoding='ISO-8859-1' ?>")
Set pi = XMLDoc.createProcessingInstruction("xml", "version=""1.0"" encoding=""ISO-8859-1""")
XMLDoc.appendChild pi

Set xADI = XMLDoc.createElement("ADI")
XMLDoc.appendChild xADI

...

XMLDoc.Save XMLFileName

---------------------------------------------------------

This xml is valid. When i open it in Internet Explorer, it is well displayed... but if I open it with notpad or wordpad, there is no carriage return, all the content of xml is displayed on one line.

Is there a way to save xml to have CRLF after each tag... but using always XML objects ?









 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top