I'm actually building a programme in excel to fill in data into a word document from a webservice. Because the XML is built up in a strange way, I have to loop through the attributes of a node, to create a list. From this list I will create a table.
My problem is this loop, I'll show you the code:
ConnectionString = "//GetConfigurationItems/ConfigurationItem/AttachmentTypes/AttachmentType"
tblFilter = "1D8651D1-99E2-4D77-9BFF-1A667AA9398D"
id = "14"
Set valuesOXML = CreateObject("msxml2.DOMDocument.4.0")
valuesOXML.LoadXML DMIService.execute(Webservice, functionName, portName, "<![CDATA[<GetConfigurationItems><ConfigurationItem ID=""" & ID & """ Filter=""" & tblFilter & """ Deleted=""0""/></GetConfigurationItems>]]>")
Set fourthNameField = valuesOXML.SelectNodes(ConnectionString)
For Each ftfield In fourthNameField
werte = werte & ftfield.Attributes(0).Text & ";"
Dim x As Integer
For x = 0 To ftfield.Attributes.Item - 1
Debug.Print ftfield.Attributes.Item(x)
Next x
Next ftfield
The command to save the werte variable is working. but the Loop through the attributes fails with the failure-Text:
"Object doens't support this property or method".
The XML looks like this:
<?xml version="1.0"?>
<GetConfigurationItems Error="False">
<ConfigurationItem ID="14" Filter="1D8651D1-99E2-4D77-9BFF-1A667AA9398D" Deleted="0">
<AttachmentTypes DropDownType="14" Filter="1D8651D1-99E2-4D77-9BFF-1A667AA9398D" Deleted="0">
<AttachmentType ShortDesc="BOA_FIT" VersionNo="2" ID="1D8651D1-99E2-4D77-9BFF-1A667AA9398D">FIT</AttachmentType>
</AttachmentTypes>
</ConfigurationItem>
</GetConfigurationItems>