I have never used xml before and need to produce an xml file as output from a system which contains 2 pieces of data, i.e. 2 keys.
I have found an example of asp code that that is kind of maybe what I can use but I cant get it to vork. The error I get is "Microsoft VBScript runtime error '800a01a8' Object required: '[object]'.
<Albums>
<Album ref="CD720">
<category>Pop</category>
<title>Come On Over</title>
<artist>Shania Twain</artist>
</Album>
<Album ref="CD024">
<category>Country & Western</category>
<title>Red Dirt Girl</title>
<artist>Emmylou Harris</artist>
</Album>
</Albums>
Code (VBScript):
Dim objXMLDoc
Set objXMLDoc = CreateObject("Microsoft.XMLDOM"
objXMLDoc.async = False
objXMLDoc.load("albums.xml"
Set NewText = objXMLDoc.createTextNode("Country"
Set Category = objXMLDoc.documentElement.lastChild.firstChild
Set OldText = Category.firstChild
Category.replaceChild NewText, OldText
objXMLDoc.save("C:\Temp\newAlbums.xml"
Does anyone have any ideas? The clock is ticking for me and I just want some code that works.
I have found an example of asp code that that is kind of maybe what I can use but I cant get it to vork. The error I get is "Microsoft VBScript runtime error '800a01a8' Object required: '[object]'.
<Albums>
<Album ref="CD720">
<category>Pop</category>
<title>Come On Over</title>
<artist>Shania Twain</artist>
</Album>
<Album ref="CD024">
<category>Country & Western</category>
<title>Red Dirt Girl</title>
<artist>Emmylou Harris</artist>
</Album>
</Albums>
Code (VBScript):
Dim objXMLDoc
Set objXMLDoc = CreateObject("Microsoft.XMLDOM"
objXMLDoc.async = False
objXMLDoc.load("albums.xml"
Set NewText = objXMLDoc.createTextNode("Country"
Set Category = objXMLDoc.documentElement.lastChild.firstChild
Set OldText = Category.firstChild
Category.replaceChild NewText, OldText
objXMLDoc.save("C:\Temp\newAlbums.xml"
Does anyone have any ideas? The clock is ticking for me and I just want some code that works.