Xml Web URL

Posted on 2011-05-04
Last Modified: 2012-05-11
Hey I have the following code below, I am trying to map a URL to an XML Document so I can query it! I am having trouble getting it to work, I get a null reference exception on the MapPath.
Dim xmlPath As String = HttpContext.Current.Server.MapPath("")

Dim feedXML As XDocument = XDocument.Load(xmlPath)

        Dim query = _
           From c In feedXML.Descendants("example") _
           Select c.@title

Open in new window

Question by:disrupt
    LVL 83

    Expert Comment

    Are you doing this in Winforms?
    LVL 16

    Accepted Solution

    You can directly use as

    Dim feedXML As XDocument = XDocument.Load("")


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now