Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 04:48 AM
Franck
Guest
 
Posts: n/a
Default 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(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.

  #2  
Old November 12th, 2005, 04:48 AM
Franck
Guest
 
Posts: n/a
Default Re: XslTransform return Xml.InnerText

NeverMind, xsl syntax error.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.