?
Solved

Set DocumentSource to External File

Posted on 2005-05-16
2
Medium Priority
?
306 Views
Last Modified: 2012-06-21
I have a live XML feed provided to my site and can have it provided in http:// or ftp, I would prefer not to give my FTP details out but cant seem to get it working with http://

        Private Sub Page_Load(ByVal sender As System.Object, _
                      ByVal e As System.EventArgs) Handles MyBase.Load

            'Put user code to initialize the page here
            xmlTransform.DocumentSource = "../xml/Weather.xml"
            xmlTransform.TransformSource = "../xml/weather.xslt"
        End Sub  'Page_Load


That is the code I have that is working but that requires the XML file to be on my Server what I want is

        Private Sub Page_Load(ByVal sender As System.Object, _
                      ByVal e As System.EventArgs) Handles MyBase.Load

            'Put user code to initialize the page here
            xmlTransform.DocumentSource = http://www.thedomain.com/feeds/myxmlfeed.xml"
            xmlTransform.TransformSource = "../xml/weather.xslt"
        End Sub  'Page_Load

I am developing in ASP.Net v 1.1 and it keeps saying http:// is not a virtual path. Having read the documentation on XMLTransform.DocumentSource it seems it does not support external sources, Is this the case or can someone show me a work around.

Thanks in Advance
0
Comment
Question by:tclgb
2 Comments
 
LVL 23

Accepted Solution

by:
b1xml2 earned 2000 total points
ID: 14018037
Dim url As String = "http://www.thedomain.com/feeds/myxmlfeed.xml"
Dim reader As New XmlTextReader(url)
Dim document As New XmlDocument()
document.Load(reader)
xmlTransform.Document = document
xmlTransform.TransformSource = "../xml/weather.xslt"
0
 

Author Comment

by:tclgb
ID: 14018959
b1xml2 that works perfect.

Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

807 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