./* means child "elements" as in  <b><i></i><em></em></b>, the child elements of b are i and em, there is two

Saying not(./*) mean no child elements

self::text() means select text node children

Saying not(self::text()) select nodes that are not text nodes, as in <p>text</p> p would be an "element" and "text" would be a child node of type text ... don't want those, just the P

Together they mean not have children and is not text nodes

What I remember of xpath is you'd write it like this

## select any "element" with no kids and no text /descendant-or-self::node()[ not(./*) and not(self::text()) ]

But apparently ( http://www.w3.org/TR/xpath ) and conditions are also represented with stacking [][][] so its equivalent to

/descendant-or-self::node() [not(./*)] [not(self::text()]

Although, you can simply select element nodes with no element children  //*[ not(./*) ]


In reply to Re^5: How can I browse & list XPATH of a XML Message? by Anonymous Monk
in thread How can I browse & list XPATH of a XML Message? by MDRI

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.