Problem of selecting nodes in Xml

  • Thread starter Thread starter Saurabh Sharma
  • Start date Start date
S

Saurabh Sharma

Hi,
I am using Dom Parsing in Xml. I am the parent node and it has many children
and each children has many children.
I want to select children with a given name .
Is there any method by which we select them with not going to each child
node .. something like
node.selectnodes (* + "/ABC");

I have time constraint and also i have to do changes so have to use DOM

Regards
Saurabh
 
Saurabh said:
Hi,
I am using Dom Parsing in Xml. I am the parent node and it has many children
and each children has many children.
I want to select children with a given name .
Is there any method by which we select them with not going to each child
node .. something like
node.selectnodes (* + "/ABC");

I have time constraint and also i have to do changes so have to use DOM

Regards
Saurabh

You can use node.SelectNodes(".//ABC");
The "//" means that any number of nodes can be between the current node
(".") and "ABC".
Maybe "./*/ABC" also works to select "grandchildren" of any child
without going deeper.
 
Hi
When i select a node by "node.Selectnodes("*/ABC")"
the nodes dont have ne details abt the parent.
Can some one plz tell me why its is not storing the detail
As after selecting i need to delete the nodes so i need the details

Regards
Saurabh
 
Back
Top