Leveraging XPATH Axes

XPATH axes come in very handy when nodes need to be selected based on (attribute’s or child element’s) values that must match those of other nodes elsewhere in the xml tree. Consider the following log4net configuration file : <?xml version=”1.0″?> <configuration> <configSections> <section name=”nhibernate” type=”System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089″ /> <section name=”log4net” type=”log4net.Config.Log4NetConfigurationSectionHandler,log4net” /> </configSections> <nhibernate> <add key=”hibernate.connection.provider” value=”NHibernate.Connection.DriverConnectionProvider” /> <add […]