I have a Problem with selecting certain nodes in a xml. The XML looks like this:
<?xml version="1.0"?>
<GetConfigurationItems Error="False">
<ConfigurationItem ID="14" Deleted="0">
<AttachmentTypes DropDownType="14" Filter="%" Deleted="0">
<AttachmentType ShortDesc="BOA_FIT" VersionNo="2" ID="1D8651D1-99E2-4D77-9BFF-1A667AA9398D">FIT</AttachmentType>
<AttachmentType ShortDesc="BOA_LIMS" VersionNo="3" ID="F543938A-693F-457A-97AA-010065D0BA4E">Lims</AttachmentType>
<AttachmentType ShortDesc="BOA_MICRO_PIC" VersionNo="1" ID="CC3FB18D-1E3F-400A-AD52-971A78A5517D">Microscope picture</AttachmentType>
</AttachmentTypes>
</ConfigurationItem>
</GetConfigurationItems>
Now i want to save the ID Attribute, BUT from a certain value, for the beginning lets just take FIT. I tried so many variations, i really dont know what im doing wrong.. :( With this Code i get XML from the Webservice:
Webservice = "http://xxx.xxx.xxx/mm/rm/webservice/RMWS_ConfigurationRead.asmx?wsdl"
functionName = "GetConfigurationItems"
portName = "RMWS_ConfigurationReadSoap"
Set DMIService = New DMIService
Set oXML = CreateObject("msxml2.DOMDocument.6.0")
oXML.LoadXML DMIService.execute(Webservice, functionName, portName, "<![CDATA[<GetConfigurationItems><ConfigurationItem ID=""" & ID & """ Deleted=""0""/></GetConfigurationItems>]]>")
So here are some of the try's of the connection string(the different trys are bsp1):
//GetConfigurationItems/ConfigurationItem[@ID="14"]/AttachmentTypes/AttachmentType[text="FIT"]/@ID
//GetConfigurationItems/ConfigurationItem[@ID="14"]/AttachmentTypes[AttachmentType="FIT"]/@ID
//GetConfigurationItems/ConfigurationItem[@ID="14"]/AttachmentTypes/[AttachmentType="FIT"]/@ID
//GetConfigurationItems/ConfigurationItem[@ID="14"]/AttachmentTypes[AttachmentType[@Name="FIT"]/@ID
//GetConfigurationItems/ConfigurationItem[@ID="14"]/AttachmentTypes[AttachmentType="FIT"]/@ID
ID = oXML.SelectSingleNode(bsp1).Text
Im quite sure thats its just a small failure, but im now trying for too long.. So would be nice if someone can help me out..
Best regards luca