MarkLogic Server 11.0 Product Documentation
Element.getAttributeNode

Element.getAttributeNode(
   name as String
) as Attr

Summary

Get the attribute of this element with the given name, if any.

Parameters
name The name of the attribute.

Usage Notes

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

Example

cts.doc("example.xml").getElementById("ex1").
  getAttribute("class").nodeValue
Powered by MarkLogic Server | Terms of Use | Privacy Policy