My XML ↓.
<partsmanagement>
<t1>thisText1</t1>
<t2>thisText2</t2>
<t3></t3>
<part>
text0
<t1>thisText3</t1>
<t2>thisText4</t2>
</part>
</partsmanagement>
I use MSXML2 in VBA. Parent node return his text and all children text too. But i need only his text value. How can i get this?
This some example of results:
? xml.selectNodes("/partsmanagement").item(0).text
return this ↓
thisText1 thisText2
text0
thisText3 thisText4
' why it return not empty string? and how get empty string?
? xml.selectNodes("/partsmanagement/t1").item(0).text
return this ↓
thisText1 ' good
? xml.selectNodes("/partsmanagement/t2").item(0).text
return this ↓
thisText2 ' good
? xml.selectNodes("/partsmanagement/t3").item(0).text
return this ↓
' empty string, good
? xml.selectNodes("/partsmanagement/part").item(0).text
return this ↓
text0 ' good
thisText1 thisText2 ' why it return this part? and how get only first row?
? xml.selectNodes("/partsmanagement/part/t1").item(0).text
return this ↓
thisText3
? xml.selectNodes("/partsmanagement/part/t2").item(0).text
return this ↓
thisText4
i want get this result:
? xml.selectNodes("/partsmanagement").item(0).text -> ' empty string
? xml.selectNodes("/partsmanagement/part").item(0).text -> text0
How can i get this?