/AAAXML:
<?xml version="1.0"> <AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA>
XPath Expression: Select all elements CCC which are children of the root element AAA
/AAA/CCCXML:
<?xml version="1.0"> <AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA>
XPath Expression: Select all elements BBB which are children of DDD which are children of the root element AAA
/AAA/DDD/BBBXML:
<?xml version="1.0"> <AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA>C# code:
// BasicSyntax - /xpath/basicsyntax.cs // Copyright 2003 by Johannes Roith using System; using System.Xml.XPath; class BasicSyntax { static void Main() { } }