P
Pim75
Hello,
I have to read a XML file in ASP and save the values in a database. I
can get this work, but I cannot read some nested nodes of the xml file.
This is a part of the XML file:
<Interface>
<Product>
<CategoryFeatureGroup ID="622" No="1">
<FeatureGroup ID="0">
<Name ID="5073" Value="Technical details" langid="1" />
<Name ID="5074" Value="Technische details" langid="2" />
<Name ID="8345" Value="Détails techniques" langid="3" />
<Name ID="16114" Value="Technische Details" langid="4" />
<Name ID="20246" Value="Technical details" langid="5" />
<Name ID="24378" Value="Technical details" langid="6" />
</FeatureGroup>
</CategoryFeatureGroup>
<CategoryFeatureGroup ID="42" No="60">
<FeatureGroup ID="3">
<Name ID="4863" Value="Memory" langid="1" />
<Name ID="4864" Value="Geheugen" langid="2" />
<Name ID="7176" Value="Mémoire vive" langid="3" />
<Name ID="16018" Value="Speicher" langid="4" />
<Name ID="20150" Value="Memory" langid="5" />
<Name ID="24282" Value="Memory" langid="6" />
</FeatureGroup>
</CategoryFeatureGroup>
</Product>
</Interface>
I read the node <CategoryFeatureGroup> with the following code:
Set rootNode = xmlDoc.selectSingleNode("Interface/Product")
For Each Node in rootNode.selectNodes("CategoryFeatureGroup")
Waarde(n) =
xmlDoc.getElementsByTagName("CategoryFeatureGroup").item(n).getAttribute("ID")
n=n+1
Next
Now I also have to read the values from <FeatureGroup> and the <Name>
elements within every <CategoryFeatureGroup>. Can someone tell me how
to do this within the ASP code above?
Thanks for any help!
Nick
I have to read a XML file in ASP and save the values in a database. I
can get this work, but I cannot read some nested nodes of the xml file.
This is a part of the XML file:
<Interface>
<Product>
<CategoryFeatureGroup ID="622" No="1">
<FeatureGroup ID="0">
<Name ID="5073" Value="Technical details" langid="1" />
<Name ID="5074" Value="Technische details" langid="2" />
<Name ID="8345" Value="Détails techniques" langid="3" />
<Name ID="16114" Value="Technische Details" langid="4" />
<Name ID="20246" Value="Technical details" langid="5" />
<Name ID="24378" Value="Technical details" langid="6" />
</FeatureGroup>
</CategoryFeatureGroup>
<CategoryFeatureGroup ID="42" No="60">
<FeatureGroup ID="3">
<Name ID="4863" Value="Memory" langid="1" />
<Name ID="4864" Value="Geheugen" langid="2" />
<Name ID="7176" Value="Mémoire vive" langid="3" />
<Name ID="16018" Value="Speicher" langid="4" />
<Name ID="20150" Value="Memory" langid="5" />
<Name ID="24282" Value="Memory" langid="6" />
</FeatureGroup>
</CategoryFeatureGroup>
</Product>
</Interface>
I read the node <CategoryFeatureGroup> with the following code:
Set rootNode = xmlDoc.selectSingleNode("Interface/Product")
For Each Node in rootNode.selectNodes("CategoryFeatureGroup")
Waarde(n) =
xmlDoc.getElementsByTagName("CategoryFeatureGroup").item(n).getAttribute("ID")
n=n+1
Next
Now I also have to read the values from <FeatureGroup> and the <Name>
elements within every <CategoryFeatureGroup>. Can someone tell me how
to do this within the ASP code above?
Thanks for any help!
Nick