XslTransform return Xml.InnerText

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Franck

    #1

    XslTransform return Xml.InnerText

    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.

  • Franck

    #2
    Re: XslTransform return Xml.InnerText

    NeverMind, xsl syntax error.

    Comment

    Working...