T
thanghuynh
hi,
Anyone else having this issue with msxml3.0 (or any other version)?
1. run this ASP code (notice the space in <myElement> </myElement>):
<%@ LANGUAGE="VBSCRIPT" %>
<%
set o = Server.createObject("MSXML2.DOMDocument.3.0")
s = "<root><myElement> </myElement></root>"
o.loadXML(s)
o.save("D:\test.xml")
%>
2. open the xml file
3. does the content of the xml file look like the following (notice
the ending tag of myElement goes to the next line)?
<root><myElement>
</myElement></root>
4. how do i get the content to look like the following (i just want
<myElement> and </myElement> to be on the same line with the space
preserved):
<root><myElement> </myElement></root>
or
<root>
<myElement> </myElement>
</root>
Anyone else having this issue with msxml3.0 (or any other version)?
1. run this ASP code (notice the space in <myElement> </myElement>):
<%@ LANGUAGE="VBSCRIPT" %>
<%
set o = Server.createObject("MSXML2.DOMDocument.3.0")
s = "<root><myElement> </myElement></root>"
o.loadXML(s)
o.save("D:\test.xml")
%>
2. open the xml file
3. does the content of the xml file look like the following (notice
the ending tag of myElement goes to the next line)?
<root><myElement>
</myElement></root>
4. how do i get the content to look like the following (i just want
<myElement> and </myElement> to be on the same line with the space
preserved):
<root><myElement> </myElement></root>
or
<root>
<myElement> </myElement>
</root>