colly92002
asked on
Access elements of a node with namespace prefixs using MSXML (#C)
I am iterating through a nodelist returned from an XMLHTTP query, using MSXML 6.0 (not the .net natve XML).
Each node in the list looks like the attached code.
Is it possible to use xpath to return the data for each node?
For example, how do I get the friendly version ID?
I tried:
MSXML2.IXMLDOMNodeList versionNode = objNode.selectNodes("a:pro pstat/a:pr op/e:Frien dlyVersion ID");
But this returns:
Reference to undeclared namespace prefix: 'a'.
How can I get around this in MSXML? I can post more code if required.
Each node in the list looks like the attached code.
Is it possible to use xpath to return the data for each node?
For example, how do I get the friendly version ID?
I tried:
MSXML2.IXMLDOMNodeList versionNode = objNode.selectNodes("a:pro
But this returns:
Reference to undeclared namespace prefix: 'a'.
How can I get around this in MSXML? I can post more code if required.
<a:response xmlns:a="DAV:">
<a:href>http://NHC-SP1/MedicalRecords/Documents/Medical%20Records/Patient%20Records/2001/Person%20-%20Care%20Plan%20-%20Standard%20-%2022-07-2008.doc</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<a:href>http://NHC-SP1/MedicalRecords/Documents/Medical%20Records/Patient%20Records/2001/Person%20-%20Care%20Plan%20-%20Standard%20-%2022-07-2008.doc</a:href>
<a:displayname>Person - Care Plan - Standard - 22-07-2008.doc</a:displayname>
<a:isfolder xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="boolean">0</a:isfolder>
<e:FriendlyVersionID xmlns:e="urn:schemas-microsoft-com:publishing:">1.0</e:FriendlyVersionID>
</a:prop>
</a:propstat>
</a:response>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER