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(M yXslString,
XmlNodeType.Doc ument, Nothing)
Dim oXslXslTransfor m As XslTransform = New XslTransform
oXslXslTransfor m.Load(oXslXmlR eader, Nothing, Nothing)
'Load the xml to transform.
Dim OXmlReader As XmlTextReader = New XmlTextReader(M yXmlString,
XmlNodeType.Doc ument, Nothing)
Dim xPathDoc As XPathDocument = New XPathDocument(O XmlReader,
XmlSpace.None)
'Transform the file
Dim sw As New System.IO.Strin gWriter
oXslXslTransfor m.Transform(xPa thDoc, Nothing, sw, Nothing)
return sw.ToString
---
And in the end, sw.ToString equals MyXmlString.Inn erText
Help please. I can't figure out the solution.
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(M yXslString,
XmlNodeType.Doc ument, Nothing)
Dim oXslXslTransfor m As XslTransform = New XslTransform
oXslXslTransfor m.Load(oXslXmlR eader, Nothing, Nothing)
'Load the xml to transform.
Dim OXmlReader As XmlTextReader = New XmlTextReader(M yXmlString,
XmlNodeType.Doc ument, Nothing)
Dim xPathDoc As XPathDocument = New XPathDocument(O XmlReader,
XmlSpace.None)
'Transform the file
Dim sw As New System.IO.Strin gWriter
oXslXslTransfor m.Transform(xPa thDoc, Nothing, sw, Nothing)
return sw.ToString
---
And in the end, sw.ToString equals MyXmlString.Inn erText
Help please. I can't figure out the solution.
Comment