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!

XML Help

Status
Not open for further replies.

jflmeing

Programmer
Jan 10, 2001
30
US

I am creating an XML file from a group of flat files, using the XML object model. When I open my XML file up in Windows Explorer all the parent and child nodes are in the correct place.
Ex 1:
<title>
<tag1>test</tag1>
<tag2>test again</tag2>
</title>

When I open the file up in notepad, the XML file looks like one big string.

Ex 2:
<title><tag1>test</tag1><tag2>test again</tag2></title>

The problem I am having is the program importing the XML file I am creating is looking for the XML file to be in the format of Ex1.

Example of my code:
Set oRoot = odoc.createElement(&quot;title&quot;)
Set odoc.documentElement = oRoot

Set oNode = odoc.createElement(&quot;tag1&quot;)
oNode.Text = &quot;testing&quot;
oRoot.appendChild oNode

Set oNode = odoc.createElement(&quot;tag2&quot;)
oNode.Text = &quot;testing again&quot;
oRoot.appendChild oNode

How can I get my XML document to look like Ex 1?

Thank you,
JL Fleming
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top