[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sub-tree filtering proposals
On Mon, Jun 07, 2004 at 10:23:17AM -0700, Andy Bierman wrote:
> How can multiple element and/or attribute selectors be combined?
As Joel M. Halpern already pointed out in private email, you can
have multiple [] selections, for example:
//interface[type="ethernet"][connector="present"]
I am assuming here an interface representation such as:
<interface>
<name>eth0</name>
<type>ethernet</type>
<connector>present</connector>
<!-- lots of other stuff -->
</interface>
The same works for attributes and things can even be nested. Assuming
an SNMP message in XML format, a valid expression would be:
//snmp[version="1"][community="public"]/pdu[@type="getnext"]
This would match a document such as the following:
<snmp length="42">
<version>1</version>
<community>public</community>
<pdu type="getnext">
<request-id>1804289385</request-id>
<error-status>0</error-status>
<error-index>0</error-index>
<varbind>
<name>1.3.6.1.2.1.1.3</name>
<value/>
</varbind>
</pdu>
</snmp>
[Don't worry about the strange example - this is simply copied from some
stuff I am working on today and by no means represents any reasonable
data model for netconf.]
/js
--
Juergen Schoenwaelder International University Bremen
<http://www.eecs.iu-bremen.de/> P.O. Box 750 561, 28725 Bremen, Germany
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>