Hi i have a need to read the xml configuration file on the unix box. There 开发者_Go百科are so far two ways to do it, one to read the xml file using a document.Load(specifying the URL!) or go ahead and create http request objects to read the content. I couldnt wrap my head in finding which is the best or if there are any other better alternatives! Thanks!
If you're dealing with the XML file more like a "document" than a "web resource", then use the Document.Load method (even if the XML file is retrieved through a URL) and vice versa. Basically, anybody else that might see your code will have an extra hint about the context: it makes things more consistent and consistency makes people feel comfortable :).
精彩评论