com.marklogic.xcc.types

## Interface XdmValue

- All Known Subinterfaces:
    ArrayNode, BooleanNode, CtsBox, CtsCircle, CtsPoint, CtsPolygon, JSArray, JSNull, JSObject, JsonItem, NullNode, NumberNode, ObjectNode, ResultItem, ResultSequence, VecVector, XdmAtomic, XdmAttribute, XdmBinary, XdmComment, XdmDocument, XdmElement, XdmItem, XdmNode, XdmProcessingInstruction, XdmSequence<I>, XdmText, XSAnyURI, XSBase64Binary, XSBoolean, XSDate, XSDateTime, XSDayTimeDuration, XSDecimal, XSDouble, XSDuration, XSFloat, XSGDay, XSGMonth, XSGMonthDay, XSGYear, XSGYearMonth, XSHexBinary, XSInteger, XSQName, XSString, XSTime, XSUntypedAtomic, XSYearMonthDuration

      public interface XdmValue

  Base interface for XML Data Model (XDM) values represented as Java objects.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `asString()` Return a String representation of this item, if possible.
    `ValueType` | `getValueType()` The XQuery type specification instance for this value.

- - ### Method Detail

    - #### getValueType

          ValueType getValueType()

      The XQuery type specification instance for this value.
      Returns:
        An instance of `ValueType` that represents the XQuery Schema type of this value.

    - #### asString

          java.lang.String asString()

      Return a String representation of this item, if possible.
      Returns:
        A Java String representation of this value. Note that this is similar but not exactly equivalent to toString(). The toString() method will always return a printable String. This method may throw an exception for some types (such as binary()).
      Throws:
        `java.lang.UnsupportedOperationException` - If the underlying value object cannot be represented as a String.

Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com