| || |
Web Services ChildElementsByPath Method
Hi, I need some help with web services xml testing.
I have the following XML:
<?xml version="1.0" encoding="utf-16"?>
<AccessIn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.datacontract.org/Tester.DTOs">
I am trying to use the ChildElementsByPath method (as I want to use XPath exclusively) to get all the child elements in the XML. Yet everytime, I try to use it, I do not get any child count. The following is the code I have so far:
'Above XML I put in came from this
Set oXMLObj = XMLWarehouse("WebServiceTest")
Set oRoot = oXMLObj.GetRootElement()
Set oChild = oXMLObj.ChildElementsByPath("/AccessIn")
I am expecting the value 3 in the msgbox, but yet I am getting 0. I suspect that the namespaces in the XML have something to do with it, but I do not know how to handle that in my code, and yet still make ChildElementsByPath work. How do I get the ChildElementsByPath method to work here?
Help very much requested and appreciated. Thanks in advance.