XML Search

  • Thread starter Thread starter C# newbie
  • Start date Start date
C

C# newbie

Hi Guys,

What will you suggest me as search method in an XML file ?
Scenario: Purpose is finding the values first. Then using some methods the
program should detect attributes, parent and even object type of the
searched value.

For instance: user would enter (for search purpose) "Math" only. Now,
program should find it and shows it, plus it should show other related
attributes like parent, subCategoryName.

<Category>
<SubCategory SubCatName="Cat1">

<Object>

<Class ClassName="AClass" ClassDivision="1" ClassName="Math">where are you
going today?</Class>

</Object>

</SubCategory>

</Category>



Thanks for your help.
 
I highly suggest reading the XPath specs http://www.w3.org/TR/xpath. These will
define various XPath
queries you can use with SelectNodes or SelectSingleNode in order to *search*
the XML document and
return some node that exhibits the properties you are looking for.
 
Justin,

Thanks for your advise. Those methods are exactly what I've to use.

Thx
C# NewBie
 
Back
Top