Class DocumentBuilder
Class DomDestination
Class DynamicContext
Class DynamicError
Class EmptyEnumerator
Class ExtensionFunctionCall
Class NullDestination
Class Processor
Class QName
Class SchemaManager
Class SchemaValidator
Class Serializer
Class StaticContext
Class StaticError
Class TextWriterDestination
Class XPathCompiler
Class XPathExecutable
Class XPathSelector
Class XQueryCompiler
Class XQueryEvaluator
Class XQueryExecutable
Class XdmAnyFunctionType
Class XdmAnyItemType
Class XdmAnyNodeType
Class XdmAtomicType
Class XdmAtomicValue
Class XdmDestination
Class XdmEmptySequence
Class XdmItem
Class XdmItemType
Class XdmNode
Class XdmNodeKind
Class XdmSequenceType
Class XdmValue
Class XmlDestination
Class XsltCompiler
Class XsltExecutable
Class XsltTransformer
Enum RecoveryPolicy
Enum SchemaValidationMode
Enum TreeModel
Enum WhitespacePolicy
Enum XdmAxis
Interface IMessageListener
Interface IQueryResolver
Interface IResultDocumentHandler
Interface IXdmEnumerator
Interface IXmlLocation
Interface SchemaResolver
public class XdmAtomicValue
The class XdmAtomicValue
represents an item in an XPath 2.0 sequence
that is an atomic value. The value may belong to any of the 19 primitive types
defined in XML Schema, or to a type derived from these primitive types, or to
the XPath 2.0 type xs:untypedAtomic
Constructor Summary | |
---|---|
XdmAtomicValue(long i)
Construct an atomic value of type |
|
XdmAtomicValue(decimal d)
Construct an atomic value of type |
|
XdmAtomicValue(float f)
Construct an atomic value of type |
|
XdmAtomicValue(double d)
Construct an atomic value of type |
|
XdmAtomicValue(bool b)
Construct an atomic value of type |
|
XdmAtomicValue(System.Uri u)
Construct an atomic value of type |
|
XdmAtomicValue(QName q)
Construct an atomic value of type |
|
XdmAtomicValue(string lexicalForm, QName type, Processor processor) Construct an atomic value of a given built-in or user-defined type |
|
XdmAtomicValue() |
Property Summary | |
---|---|
Object |
Value Get the value as a CLI object of the nearest equivalent type. |
Method Summary | |
---|---|
bool |
IsAtomic() Determine whether the item is an atomic value |
static XdmAtomicValue |
WrapExternalObject(object external) Create an atomic value that wraps an external object. Such values can be used in conjunction with extension functions. |
String |
ToString() Convert the atomic value to a string |
QName |
GetTypeName(Processor processor) Get the name of the value's XDM type |
QName |
GetPrimitiveTypeName() Get the name of the primitive type of the value |
Constructor Detail |
---|
public XdmAtomicValue(long i)
Construct an atomic value of type xs:integer
i
-
public XdmAtomicValue(decimal d)
Construct an atomic value of type xs:decimal
d
-
public XdmAtomicValue(float f)
Construct an atomic value of type xs:float
f
-
public XdmAtomicValue(double d)
Construct an atomic value of type xs:double
d
-
public XdmAtomicValue(bool b)
Construct an atomic value of type xs:boolean
b
-
public XdmAtomicValue(System.Uri u)
Construct an atomic value of type xs:anyURI
u
-
public XdmAtomicValue(QName q)
Construct an atomic value of type xs:QName
q
-
public XdmAtomicValue(string lexicalForm, QName type, Processor processor)
Construct an atomic value of a given built-in or user-defined type
Parameters:lexicalForm
-
type
-
SchemaManager
.
processor
-
Processor
object. This is needed for looking up user-defined
types, and also because some conversions are context-sensitive, for example they depend on the
implicit timezone or the choice of XML 1.0 versus XML 1.1 for validating names.
public XdmAtomicValue()
Property Detail |
---|
public Object Value {get; }
Get the value as a CLI object of the nearest equivalent type.
The return type is as follows:
xs:string - String
xs:integer - Long
xs:decimal - Decimal
xs:double - Double
xs:float - Float
xs:boolean - Bool
xs:QName - QName
xs:anyURI - Uri
xs:untypedAtomic - String
Other types - currently String, but this may change in the future
Method Detail |
---|
public bool IsAtomic()
Determine whether the item is an atomic value
public XdmAtomicValue WrapExternalObject(object external)
Create an atomic value that wraps an external object. Such values can be used in conjunction with extension functions.
This method should not be used to create simple atomic values representing strings, numbers, booleans, and so on. For that purpose, use the relevant constructor. Wrapped external objects are used only when calling .NET native code external to a query or stylesheet.
In releases prior to 9.2, this method also existed with the alternative spelling
wrapExternalObject
(lower-case "w"). This was retained for backwards compatibility,
but caused problems for Visual Basic users, where it is not permitted to have two methods whose
names differ only in case. Any applications using wrapExternalObject
must
therefore be changed to use WrapExternalObject
. Apologies for the inconvenience.
external
-
public String ToString()
Convert the atomic value to a string
public QName GetTypeName(Processor processor)
Get the name of the value's XDM type
Parameters:processor
-
Processor
object.
This is needed for access to the NamePool,
which maps the internal form of type names to their external form.
public QName GetPrimitiveTypeName()
Get the name of the primitive type of the value
xs:untypedAtomic
. For the purposes of this method, xs:integer
is considered
to be a primitive type.