Skip to content

Proxy Authentication Required

Drew Taylor

Asked Jun 8, 2007, 1:31 AM EDT1 answer
Share
LinkedInX

I am trying to get the XML from a URL but I'm getting the following error.

Proxy Authentication Required.


Here is the code I am using:

Java
string sUrl = "http://google.com";
StringBuilder oBuilder = new StringBuilder();
StringWriter oStringWriter = new StringWriter(oBuilder);
XmlTextReader oXmlReader = new XmlTextReader(sUrl);
XmlTextWriter oXmlWriter = new XmlTextWriter(oStringWriter);
while (oXmlReader.Read())
{
oXmlWriter.WriteNode(oXmlReader, true);
}
addListItem( oBuilder.ToString() );
oXmlReader.Close();
oXmlWriter.Close();

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I might be wrong, but I think its because you can't read XML from a URL. Maybe your mistaking XML for XHTML, which is eXtensibile HyperText Markup Language and its what 90% of web pages are built on these days unless you get into PHP or JavaScript and what not.
    XML I believe is used primarily for web data storage on a user's PC and for small and simple database-like needs, it can be read by a web page, but is not an actual part of the build source code. Then again, I could be wrong but in all my web designing in college we never once used XML for the actual code construction of web pages.

    -Scrap
    0