MarkLogic 10 Product Documentation
Node.toObject

Node.toObject() as Object

Summary

This is inherited from the Value object.

Return a JavaScript object value.

Usage Notes

Array nodes will be returned as JavaScript arrays, object nodes will be returned as JavaScript objects, and text, number, or boolean nodes will be returned as String, Number, or Boolean values, respectively. Document nodes will have their child converted.

xs:date and xs:dateTime will be returned as JavaScript date objects.

The method is undefined for other kinds of nodes (XML and binary nodes).

Powered by MarkLogic Server | Terms of Use | Privacy Policy