1
Answer

Select XML Node

Ask a question
oc A

oc A

16y
3.8k
1

Hi,
i am doing a VB.NET Windows Application. In that i am trying to select a node from XML File and add child nodes to that selected node. My XML File looks like this

<?xml version="1.0" encoding="utf-8"?>
<csRoot>
<CS>
      <CardCode>CC6</CardCode>
      <Version>1.1</Version>
      <MF BS="3820" FID="3F00" AC="0000" KN="0000" />
</CS>
<CS>
      <CardCode>CC6</CardCode>
      <Version>1.0</Version>
      <MF BS="3820" FID="3F00" AC="0000" KN="0000" />
</CS>
<CS>
      <CardCode>CC7</CardCode>
      <Version>3.2</Version>
      <MF BS="3820" FID="3F00" AC="0000" KN="0000" />
</CS>
</csRoot>

Here i want to select the node whose CardCode is CC6 and Version is 1.0.
How i should write the code for this .. Also after selecting that i want to create a child node for that MF with attributes BS, FI, AC, KN etc. Can anybody help me in doing this .. plz


Answers (1)