Loading TOC...

MarkLogic Server 11.0 Product Documentation
Element.getElementsByTagName

Element.getElementsByTagName(
   name as String
) as NodeList

Summary

Return all the elements that are descendants of the current element that have the given name.

Parameters
name Name of the elements to return.

Usage Notes

Since lookup is by the string value of the name, it is best to avoid using this method for namespaced elements. Use getElementsByTagNameNS instead.

See also the Node.xpath method.

Example

cts.doc("example.xml").root.getElementsByTagName("para");

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.