Hi all
Hoping someone can help me out on this...
I've got a DataGridView that's configured like this to read from my Configuration.xml file
The XML File looks like this...
I'd like to loop through the 'DrawingBorderBlocks' node(s) using XMLDocument... presently doing it like so
Seems a little inefficient to me; I tried using a .SelectSingleNode on "/Configuration/DrawingBorderBlocks' but that's only selecting the 1st node and not the remaining 5...
Thanks!
Hoping someone can help me out on this...
I've got a DataGridView that's configured like this to read from my Configuration.xml file
VB.NET:
MatchMakerXML_Dataset.ReadXml(Application.StartupPath & "\Configuration.xml")
AutoCADDrawingBorderBlocks_DataView.DataSource = MatchMakerXML_Dataset
AutoCADDrawingBorderBlocks_DataView.DataMember = "DrawingBorderBlocks"
The XML File looks like this...
VB.NET:
<?xml version="1.0" standalone="yes"?>
<Configuration>
<Associations>
<ReferenceAttribute Association="Component" />
</Associations>
<DrawingBorderBlocks>
<Block>TITLE_06</Block>
</DrawingBorderBlocks>
<DrawingBorderBlocks>
<Block>NOTEBX</Block>
</DrawingBorderBlocks>
<DrawingBorderBlocks>
<Block>REFBX</Block>
</DrawingBorderBlocks>
<DrawingBorderBlocks>
<Block>REVBX</Block>
</DrawingBorderBlocks>
<DrawingBorderBlocks>
<Block>TITLEBX</Block>
</DrawingBorderBlocks>
<DrawingBorderBlocks>
<Block>ILD_BORDER</Block>
</DrawingBorderBlocks>
<Settings>
<ModeOfOperation Setting="Population" />
</Settings>
</Configuration>
I'd like to loop through the 'DrawingBorderBlocks' node(s) using XMLDocument... presently doing it like so
VB.NET:
Dim Configuration_XMLDoc As New XmlDocument()
Dim Configuration_XMLDoc_Node As XmlElement
Configuration_XMLDoc.Load(Application.StartupPath & "\Configuration.xml")
Configuration_XMLDoc_Node = Configuration_XMLDoc.SelectSingleNode("/Configuration")
For Each Node As XmlNode In Configuration_XMLDoc_Node
If (Node.Name = "DrawingBorderBlocks") Then
For Each childNode As XmlNode In Node
AutoCAD_DrawingBorderBlocks.Add(childNode.InnerText)
Next
End If
Next
Seems a little inefficient to me; I tried using a .SelectSingleNode on "/Configuration/DrawingBorderBlocks' but that's only selecting the 1st node and not the remaining 5...
Thanks!