XslTransform return InnerText

F

Franck

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(oXslXmlR­eader, 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(xPa­thDoc, Nothing, sw, Nothing)
return sw.ToString
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top