Datatypes: .NET to XPath/XQuery

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Engine Information > XSLT and XPath/XQuery Functions > Miscellaneous Extension Functions > .NET Extension Functions >

Datatypes: .NET to XPath/XQuery

When a .NET method returns a value and the datatype of the value is a string, numeric or boolean type, then it is converted to the corresponding XPath/XQuery type. For example, .NET's decimal datatype is converted to xsd:decimal.

 

When a .NET object or a datatype other than string, numeric or boolean is returned, you can ensure conversion to the required XPath/XQuery type by first using a .NET method (for example System.DateTime.ToString()) to convert the .NET object to a string. In XPath/XQuery, the string can be modified to fit the lexical representation of the required type and then converted to the required type (for example, by using the cast as expression).

 


© 2019 Altova GmbH