xml transformation

Results 1 to 2 of 2

Thread: xml transformation

  1. #1
    Join Date
    Dec 1969

    Default xml transformation

    Hi <BR><BR>i am trying to transform my xml file using an xsl tranformation method.My code is as follows:<BR><BR>XPathDocument document = new XPathDocument( MapPath( "XMLFile1.xml" ) );<BR><BR> XslTransform xslt = new XslTransform();<BR> xslt.Load( MapPath( "XSLTFile1.xslt" ) );<BR> <BR> XmlReader xmlreader = xslt.Transform( document, null );<BR> xmlreader.MoveToContent();<BR><BR> Response.Write( xmlreader.ReadOuterXml() );<BR><BR>However when i build my x.aspx file i get the error <BR>&#039;System.Xml.XmlException: &#039;xsl&#039; is an undeclared namespace. Line 2, position 2.&#039; and line <BR><BR>XslTransform xslt = new XslTransform();<BR> xslt.Load( MapPath( "XSLTFile1.xslt" ) );<BR> <BR>is highlighted.<BR><BR>i have used system.xml.xsl , system.xml,system.xml.xpath and system.IO in my file but still i am unable to debug this error.Please help!!!<BR><BR>thanks<BR>Sam123

  2. #2
    Join Date
    Dec 1969

    Default RE: xml transformation

    Try removing the "new" in your declration line

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts