Hi,
Getting crazy with the XslTransform Class.
I'm trying to transform an xml string with an xsl string with the
following code :
'Create the XslTransform object and load the stylesheet.
Dim oXslXmlReader As XmlTextReader = New XmlTextReader(MyXslString,
XmlNodeType.Document, Nothing)
Dim oXslXslTransform As XslTransform = New XslTransform
oXslXslTransform.Load(oXslXmlReader, Nothing, Nothing)
'Load the xml to transform.
Dim OXmlReader As XmlTextReader = New XmlTextReader(MyXmlString,
XmlNodeType.Document, Nothing)
Dim xPathDoc As XPathDocument = New XPathDocument(OXmlReader,
XmlSpace.None)
'Transform the file
Dim sw As New System.IO.StringWriter
oXslXslTransform.Transform(xPathDoc, Nothing, sw, Nothing)
return sw.ToString
---
And in the end, sw.ToString equals MyXmlString.InnerText
Help please. I can't figure out the solution.