Results 1 to 2 of 2

Thread: XMLTextReader-Server.MapPath

  1. #1
    Join Date
    Dec 1969

    Default XMLTextReader-Server.MapPath

    Hey, in this script:<BR><BR>http://authors.aspalliance.com/wisemonk/view.aspx?id=AX012502<BR><BR>where is says "news.xml"<BR>i tried using an my Amazon feed instead:<BR>http://xml.amazon.com/onca/xml3?t=jwubooks-20&dev-t=D1KH2SZ67VK11Y&AsinSearch=0072832541&mode=books& sort=+pmrank&offer=Used&type=lite&page=&f=xml<BR>< BR>Does the "XMLTextReader(Server.MapPath" only work locally?

  2. #2
    Join Date
    Dec 1969

    Default Server.MapPath is for *FILES*...

    ...Files on the local web server (or on a LAN, if properly configured) *ONLY*.<BR><BR>If you want to use it with a URL, you have to first create a Stream or TextReader that is connected to that URL (or, alternatively, convert the URL to an in-memory string and pass that along).<BR><BR>Just RTFM for the XMLTextReader class.<BR><BR>Especially for the constructor:<BR>http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclassctortopic.asp<BR>< BR>Or, better, check the docs on your own machine (hopefully assuming you have installed the docs there).<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts