Connecting Tech Pros Worldwide Help | Site Map

XslTransform return InnerText

Franck
Guest
 
Posts: n/a
#1: Nov 21 '05
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


---
And in the end, sw.ToString equals to my Xml Document InnerText


Help please. I can't figure out the solution.

Franck
Guest
 
Posts: n/a
#2: Nov 21 '05

re: XslTransform return InnerText


NeverMind, xsl syntax error.

Closed Thread


Similar Visual Basic .NET bytes