Hello all,

 

I'm trying to figure if a certain element <myelement> has any (at least one)
descendant with name <mydescendant>. 

 

For example:

 

<myelement>

            <mychildelement/>

            <myotherchildelement/>

            <mydescparent>

                        <mydescendant/>

            </mydescparent>

</myelement>

 

. would yield TRUE for <myelement>.

                        

If there is no such method, I could take the XML text (the portion of the
XML document) corresponding to <myelement> and then look for a regular
expression like "<mydescendant[ >]" (where brackets include a SPACE and a
GREATER_THAN sign).

 

.but I can't figure out how I can get the XML text either.

 

Somebody can help?

 

Thank you

 

Nicolas Tsokas, National Hellenic Research Foundation

 

Reply via email to