Jeff Johnson wrote on 2015-02-13: > I am calling a web service that returns an XML file. Most of the > returns of this web service are well documented but this one is not. > Question 1, is there a way I can convert the returned object (XML file) > to something I can read, like a text file? > Since there is a hierarchy of tags, how do I determine how to reference > the tag I want? > > TIA
Jeff, XML Notepad 2007 has been a great helper to me. http://www.microsoft.com/en-us/download/details.aspx?id=7973 If this XML has embedded namespaces, you'll need to load them in a search to be able to search them in the returned XML object. You search for items in your XML using a namespace:element Here is something I used in a recent test project: xml.setProperty("SelectionNamespaces", [xmlns:ns0="] + xml.namespaces[0] + [" xmlns:ns1="] + xml.namespaces[1] + ["]) nextLinkNode = xml.selectSingleNode("ns0:feed/ns0:link[@rel='next']") ns0 is the first namespace found in the XML document feed and link are elements rel is an attribute of the link element next is the value of rel that I'm specifically looking for In an XML document, the embedded namespaces would look like <feed xmlns="http://www.w3.org/2005/Atom"> If your XML document doesn't have inline namespaces, this is just extra that you don't need. Tracy Pearson PowerChurch Software _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

