xsl-list
[Top] [All Lists]

Re: [xsl] (simple?) xpath question

2008-08-29 14:23:12
"Mark" == mark bordelon <markcbordelon(_at_)yahoo(_dot_)com> writes:

    Mark> All *help*!    What is the best way to query xml with xpath
    Mark> to get a disjoint nodelist? Specifically i want to include
    Mark> just the root node alongwith a descendent node.    XML:  
    Mark> <a>   <b>     <c>     </c>  </b> </a>   XPATH:   //c  
    Mark> DESIRED RESULT NODELIST: i.e. not this: <c> </c>   but
    Mark> rather this: <a>   <c>   </c> </a>

One possibility is:

//*[name() != "b"]

It depends on your exact requirements.
-- 
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--