DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Kunal H. Parikh Guest

    convert between System.Xml.XmlDocument and System.Xml.Xsl.XslTransform


    Hi !

    I want to be able to convert between System.Xml.XmlDocument and System.Xml.Xsl.XslTransform.

    Is that gonna be possible ?

    Kunal

  2. #2
    Sergey Kats Guest

    Re: convert between System.Xml.XmlDocument and System.Xml.Xsl.XslTransform

    You can load XmlDocument right into XslTransform using Load().

    // Assuming xmlDoc is the valid XmlDocument
    XslTransform xsl = new XslTransform();
    xsl.Load(xmlDoc);

    Sergey.

    "Kunal H. Parikh" <kunal@kaypee.net> wrote in message
    news:3c60a720$1@10.1.10.29...
    >
    > Hi !
    >
    > I want to be able to convert between System.Xml.XmlDocument and

    System.Xml.Xsl.XslTransform.
    >
    > Is that gonna be possible ?
    >
    > Kunal




  3. #3
    Kunal H. Parikh Guest

    Re: convert between System.Xml.XmlDocument and System.Xml.Xsl.XslTransform


    Not quite Sergey.

    When I try doing what you said, I get an "NullReferenceException"

    I also tried cloning, but same problem.

    And when I say xmlDoc.toString() I do get a response.


    Can you make any suggestion there ?


    TIA,

    Kunal

    "Sergey Kats" <sctrl@hotmail.com> wrote:
    >You can load XmlDocument right into XslTransform using Load().
    >
    >// Assuming xmlDoc is the valid XmlDocument
    >XslTransform xsl = new XslTransform();
    >xsl.Load(xmlDoc);
    >
    >Sergey.
    >
    >"Kunal H. Parikh" <kunal@kaypee.net> wrote in message
    >news:3c60a720$1@10.1.10.29...
    >>
    >> Hi !
    >>
    >> I want to be able to convert between System.Xml.XmlDocument and

    >System.Xml.Xsl.XslTransform.
    >>
    >> Is that gonna be possible ?
    >>
    >> Kunal

    >
    >



  4. #4
    Sergey Kats Guest

    Re: convert between System.Xml.XmlDocument and System.Xml.Xsl.XslTransform

    I'm not sure what's going on. This exception usually means that you tried to
    reference a null.
    Post your code and indicate on which line you're getting the error.

    Sergey.

    "Kunal H. Parikh" <kunal@kaypee.net> wrote in message
    news:3c622943$1@10.1.10.29...
    >
    > Not quite Sergey.
    >
    > When I try doing what you said, I get an "NullReferenceException"
    >
    > I also tried cloning, but same problem.
    >
    > And when I say xmlDoc.toString() I do get a response.
    >
    >
    > Can you make any suggestion there ?
    >
    >
    > TIA,
    >
    > Kunal
    >
    > "Sergey Kats" <sctrl@hotmail.com> wrote:
    > >You can load XmlDocument right into XslTransform using Load().
    > >
    > >// Assuming xmlDoc is the valid XmlDocument
    > >XslTransform xsl = new XslTransform();
    > >xsl.Load(xmlDoc);
    > >
    > >Sergey.
    > >
    > >"Kunal H. Parikh" <kunal@kaypee.net> wrote in message
    > >news:3c60a720$1@10.1.10.29...
    > >>
    > >> Hi !
    > >>
    > >> I want to be able to convert between System.Xml.XmlDocument and

    > >System.Xml.Xsl.XslTransform.
    > >>
    > >> Is that gonna be possible ?
    > >>
    > >> Kunal

    > >
    > >

    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links