Thanks Brian,
The use of MSXML2 objects solved the problem. The code follows:
Dim XmlXSLTFile
Dim XmlSrcFile
Dim XmlOutFile
' file names
XmlXSLTFile = "F:\thodoris\Work\books.xsl"
XmlSrcFile = "F:\thodoris\Work\books.xml"
XmlOutFile = "F:\thodoris\Work\\booksOUT.xml"
' load XSLT (in memory)
Dim XmlXSLT
Set XmlXSLT = CreateObject("MSXML2.DOMDocument.4.0")
XmlXSLT.Load (XmlXSLTFile)
' load source XML document file (in memory)
Dim XmlDoc
Set XmlDoc = CreateObject("MSXML2.DOMDocument.4.0")
XmlDoc.Load (XmlSrcFile)
' create new empty output (in memory) document
Dim XmlOut
Set XmlOut = CreateObject("MSXML2.DOMDocument.4.0")
' transform source document to output document according to
' given XSLT
XmlDoc.transformNodeToObject XmlXSLT, XmlOut
' save output XML document to file
XmlOut.save (XmlOutFile)
Regards,
Theodore.
Quote:
quote:Originally posted by bmains
Use MSXML2 DOM objects to access each nodes. I believe you can change the field names. Don't know the exact objects to do this, but look at both the node and element objects in the SDK.
Brian
|