1
Reply

Select Nodes from XML File

oc A

oc A

16 years ago
6.7k

Hai friends,

I am doing a VB.NET windows application. In that I am selecting nodes from XML File. My XML File Format looks as given below.

 

<?xml version="1.0" encoding="utf-8"?>

<MsgRoot>

  <Msg>

    <MsgID>AB1</MsgID>

    <MsgDesc>AB-CVA</MsgDesc>

    <Field_cnt>9</Field_cnt>

    <Action>1</Action>

    <Response>3</Response>

  </Msg>

  <Msg>

    <MsgID>AB2</MsgID>

    <MsgDesc>AB-AMT</MsgDesc>

    <Field_cnt>10</Field_cnt>

    <Action>1</Action>

    <Response>3</Response>

  </Msg>

  <Msg>

    <MsgID>AB1</MsgID>

    <MsgDesc>AB-JJS</MsgDesc>

    <Field_cnt>9</Field_cnt>

    <Action>1</Action>

    <Response>3</Response>

  </Msg>

  <Msg>

    <MsgID>AB1</MsgID>

    <MsgDesc>AB-IC</MsgDesc>

    <Field_cnt>12</Field_cnt>

    <Action>1</Action>

    <Response>3</Response>

  </Msg>

</MsgRoot>

 

What I want to do is I want to select nodes with MsgID = AB1 and display those details in DataGrid. In datagrid I want to display only

MsgDesc,Field_cnt,Action,Response. That is I don’t want to display MsgID. How I can do ths. Can anybody help me. I tried many ways. But none is working. Any help appreciated.

Thanks in Advance


Answers (1)