org.apache.derby.iapi.types
Interface XMLDataValue
- All Superinterfaces:
- DataValueDescriptor, java.io.Externalizable, Formatable, Orderable, java.io.Serializable, Storable, TypedFormat
- All Known Implementing Classes:
- XML
- public interface XMLDataValue
- extends DataValueDescriptor
Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
checkHostVariable, coalesce, compare, compare, equals, estimateMemoryUsage, getBoolean, getByte, getBytes, getClone, getDate, getDouble, getFloat, getInt, getLength, getLong, getNewNull, getObject, getShort, getStream, getString, getTime, getTimestamp, getTypeName, greaterOrEquals, greaterThan, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, readExternalFromArray, setBigDecimal, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, typePrecedence, typeToBigDecimal |
Methods inherited from interface java.io.Externalizable |
readExternal, writeExternal |
parseAndLoadXML
public void parseAndLoadXML(java.lang.String xmlText,
boolean preserveWS)
throws StandardException
- Parse the received string value as XML. If the
parse succeeds, store the string value as the
contents of this XML value.
- Parameters:
preserveWS
- Whether or not to preserve
ignorable whitespace.
- Returns:
- If 'text' constitutes a valid XML document,
it has been stored in this XML value and nothing
is returned; otherwise, an exception is thrown.
- Throws:
StandardException
- Thrown on parse error.
XMLSerialize
public StringDataValue XMLSerialize(StringDataValue result,
int targetType,
int targetWidth)
throws StandardException
- The SQL/XML XMLSerialize operator.
Converts this XML value into a string with a user-specified
type, and returns that string via the received StringDataValue.
(if the received StringDataValue is non-null and of the
correct type; else, a new StringDataValue is returned).
- Parameters:
result
- The result of a previous call to this method,
null if not called yet.targetType
- The string type to which we want to serialize.targetWidth
- The width of the target type.
- Returns:
- A serialized (to string) version of this XML object,
in the form of a StringDataValue object.
- Throws:
StandardException
- Thrown on error
XMLExists
public BooleanDataValue XMLExists(StringDataValue xExpr,
XMLDataValue xml)
throws StandardException
- The SQL/XML XMLExists operator.
Takes an XML query expression (as a string) and an XML
value and checks if at least one node in the XML
value matches the query expression. NOTE: For now,
the query expression must be XPath only (XQuery not
supported).
- Parameters:
xExpr
- The query expression, as a string.xml
- The XML value being queried.
- Returns:
- True if the received query expression matches at
least one node in the received XML value; unknown if
either the query expression or the xml value is null;
false otherwise.
- Throws:
StandardException
- Thrown on error
exists
public boolean exists(java.lang.String xExpr)
throws StandardException
- Helper method for XMLExists.
See if the received XPath expression returns at least
one node when evaluated against _this_ XML value.
- Parameters:
xExpr
- The XPath expression.
- Returns:
- True if at least one node in this XML value
matches the received xExpr; false otherwise.
- Throws:
StandardException
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.