Parsing an xml document at a remote URL using VB 6.0

丶灬走出姿态 提交于 2019-12-10 23:18:14

问题


I am trying to parse through the contents of an xml file resident on a remote server in visual basic 6.0 using the MSXML2.DOMDocument class.

I am using the Load method of the MSXML2.DOMDocument class to pass in the url. The url is of the form http://<server>/ABC.xml, however, the server requires user credentials for accessing the file.

How do I pass in user credentials using this class or another supporting class?


回答1:


You can use http://<username>:<password>@<server>/ABC.xml in many cases, or you can use the XMLHTTPRequest helper object to make the actual requests.

Note that when you use an MSXML DOMDocument object you aren't parsing anything, the object does the heavy lifting. All you're doing is navigating the DOM tree, a trivial task by comparison.



来源:https://stackoverflow.com/questions/11212693/parsing-an-xml-document-at-a-remote-url-using-vb-6-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!