MarkLogic 10 Product Documentation
Text.substring

Text.substring(
   offset as Number,
   count as Number
) as Number

Summary

This is inherited from the CharacterData object.

A substring of the character data, starting at a given offset and continuing for a given length.

Parameters
offset The starting position.
count The length of the substring to return.

Usage Notes

The offset and count should be non-negative integers. An error will be raised if they are not.

It is an error for the offset plus the count is more than the size of the data.

Example

cts.doc("example.xml").root.firstChild.substring(2,5)
Powered by MarkLogic Server | Terms of Use | Privacy Policy