[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Compact XPath syntax
Writing a bit late to this thread ... On Dec 20, 2007 5:14 AM, Ramkumar Menon <ramkumar.menon@xxxxxxxxx> wrote: > Consider another XML. > > <a> > <b> > <c> > </b> > <f> > <c> > </f> > </a> > I could refer to the node "c" as "!c", which matches all "c" nodes at > all levels. I specify something on the lines of !c[parent::b] or > !c[parent::f] to address the respective "c" nodes. Personally speaking, I find XPath capabilities to address parts of XML document fine. To my opinion, it's a great language in fact. In XPath, we write XPath expressions to reach nodes from a context node. We can use various axes and node types provided, in our expressions. Incidentally, for the above example, I would write the expression as: //c[parent::b] //c[parent::f] (in these examples, we filter nodes using a predicate). or //c (if you want to select all 'c' elements everywhere in the tree). -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|