Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-26
1
Medium Priority
?
3,175 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
1 Comment
 
LVL 2

Accepted Solution

by:
praveen79 earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

963 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