Solved

Exception "Invalid URI - The URI Scheme is not VALID" occured while transformation

Posted on 2004-08-26
1
3,112 Views
Last Modified: 2012-06-21
Public Function cleanExpXML(ByVal _expXML As String, ByVal _xslFilepath As String) As String
               Try
           Dim expFile_xmlDoc As New xmldocument
            Dim outputXML As String

            ' Load xsl document
            If xslTransformDoc Is Nothing Then
                resolver = New XmlUrlResolver
                resolver.Credentials = CredentialCache.DefaultCredentials
                xslTransformDoc = New XslTransform
                xslTransformDoc.Load(_xslFilepath)            
            End If

            expFile_xmlDoc.LoadXml(_expXML)
            Dim argumentList As XsltArgumentList

            ' Transform the file.
            xslTransformDoc.Transform(_expXML, outputXML, resolver)    'exception occuring here     '_xslFilepath is something  like  d:\www\temp\myxsl.xsl  

            Return outputXML    

        Catch ex As Exception
            Console.WriteLine(ex.ToString)
        End Try
    End Function


i mean,is there any constructor which returns the transformed document as a string INSTEAD of transforming document to a file?


thanks for your reply

regards

0
Comment
Question by:vihar123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
praveen79 earned 500 total points
ID: 11900878
hi,

try this ....



 Dim strWriter As StringWriter = New StringWriter

  ' Transform the file.
      xslTransformDoc.Transform(expFile_xmlDoc.CreateNavigator(), argumentList, strWriter , resolver)
       outputXML = strWriter .ToString()
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question