Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-26
1
Medium Priority
?
3,136 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

719 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