xpath library
Dart XPath adds support of XPath 3.1 expressions to the XML library.
Classes
- XPathAnyUri
- Represents an xs:anyURI atomic value.
- XPathArray
- Represents an XDM 3.1 array item (array(*)).
- XPathArrayType
-
XDM 3.1 array type descriptor (e.g.
array(*),array(xs:string)). - XPathAtomic
- Base class for all atomic values in the XDM 3.1 data model.
- XPathBinary
- Representation of binary atomic values (xs:base64Binary and xs:hexBinary).
- XPathBoolean
- Represents an xs:boolean atomic value.
- XPathConfiguration
- Static configuration for XPath evaluation.
- XPathDateTime
- Representation of XPath date and time values (xs:dateTime, xs:dateTimeStamp, xs:date, xs:time, xs:gYearMonth, xs:gYear, xs:gMonthDay, xs:gMonth, and xs:gDay).
- XPathDecimal
- Arbitrary-precision decimal (xs:decimal).
- XPathDouble
- 64-bit IEEE 754 float (xs:double and xs:float).
- XPathDuration
- Representation of XPath duration values (xs:duration, xs:yearMonthDuration, and xs:dayTimeDuration).
- XPathErrorCode
- XPath 3.1 and XQuery standard error codes.
- XPathFunction
- A callable XPath function item (builtin, anonymous, or partial).
- XPathFunctionItem
- Base class for all function items (functions, maps, arrays) in XDM 3.1.
- XPathFunctionType
-
XDM 3.1 function type descriptor (e.g.
function(*),function(xs:string) as xs:integer). - XPathInteger
- Arbitrary-precision integer (xs:integer and subtypes).
- XPathItem
- Base interface for all items in the XDM 3.1 data model.
- XPathMap
- Represents an XDM 3.1 map item (map(*)).
- XPathMapType
-
XDM 3.1 map type descriptor (e.g.
map(*),map(xs:string, xs:integer)). - XPathNode
- Represents an XML node item in the XDM 3.1 data model.
- XPathNumeric
- Sealed base class for all XDM numeric atomic values.
- XPathQName
- Represents an xs:QName atomic value.
- XPathSequence
- Base class for all sequences in the XDM 3.1 data model.
- XPathSequenceType
- Sequence type with item type and cardinality constraint.
- XPathString
- Represents an xs:string (or derived subtype) atomic value.
- XPathType
- XDM 3.1 type descriptor hierarchy.
- XPathUntypedAtomic
- Represents an xs:untypedAtomic value.
Extensions
- XPathExtension on XmlNode
- XPathGenerator on XmlNode
- XPathWrappedFunctionExtension on Function
- Extension to convert a Dart Function into an XPathFunction.
Constants
-
allStandardTypes
→ const List<
XPathType> - All standard built-in types.
- xsAny → const _XDMType
- xsAnyAtomicType → const _XDMType
- xsAnyURI → const _XDMType
- xsArray → const _XDMType
- xsAttribute → const _XDMType
- xsBase64Binary → const _XDMType
- xsBoolean → const _XDMType
- xsByte → const _XDMType
- xsComment → const _XDMType
- xsDate → const _XDMType
- xsDateTime → const _XDMType
- xsDateTimeStamp → const _XDMType
- xsDayTimeDuration → const _XDMType
- xsDecimal → const _XDMType
- xsDocument → const _XDMType
- xsDouble → const _XDMType
- xsDuration → const _XDMType
- xsElement → const _XDMType
- xsEmptySequence → const _XPathEmptySequenceType
- The empty sequence type.
- xsENTITIES → const _XDMType
- xsENTITY → const _XDMType
- xsError → const _XDMType
- xsFloat → const _XDMType
- xsFunction → const _XDMType
- xsGDay → const _XDMType
- xsGMonth → const _XDMType
- xsGMonthDay → const _XDMType
- xsGYear → const _XDMType
- xsGYearMonth → const _XDMType
- xsHexBinary → const _XDMType
- xsID → const _XDMType
- xsIDREF → const _XDMType
- xsIDREFS → const _XDMType
- xsInt → const _XDMType
- xsInteger → const _XDMType
- xsItem → const _XDMType
- xsLanguage → const _XDMType
- xsLong → const _XDMType
- xsMap → const _XDMType
- xsName → const _XDMType
- xsNamespace → const _XDMType
- xsNCName → const _XDMType
- xsNegativeInteger → const _XDMType
- xsNMToken → const _XDMType
- xsNMTOKENS → const _XDMType
- xsNode → const _XDMType
- xsNonNegativeInteger → const _XDMType
- xsNonPositiveInteger → const _XDMType
- xsNormalizedString → const _XDMType
- xsNOTATION → const _XDMType
- xsNumeric → const _XDMType
- xsPositiveInteger → const _XDMType
- xsProcessingInstruction → const _XDMType
- xsQName → const _XDMType
- xsSequence → const XPathSequenceType
-
The generic sequence type
item()*. - xsShort → const _XDMType
- xsString → const _XDMType
- xsText → const _XDMType
- xsTime → const _XDMType
- xsToken → const _XDMType
- xsUnsignedByte → const _XDMType
- xsUnsignedInt → const _XDMType
- xsUnsignedLong → const _XDMType
- xsUnsignedShort → const _XDMType
- xsUntypedAtomic → const _XDMType
- xsYearMonthDuration → const _XDMType
Properties
-
standardTypes
→ Map<
String, XPathType> -
Lookup table of all standard types by name and alias.
final
Functions
-
isValidNCName(
String s) → bool -
Checks whether
sis a valid XML NCName. -
isValidQName(
String s) → bool -
Checks whether
sis a valid lexical QName (eitherNCNameorNCName:NCName). -
roundToFloat(
double value) → double - Converts a 64-bit Dart double to a 32-bit single-precision IEEE 754 float.
Typedefs
- XPathTraceCallback = void Function(XPathSequence value, String? label)
- Function type for tracing evaluation.
- XPathUnparsedTextLoader = String? Function(String uri, String? encoding)
- Function type for loading unparsed text.
Exceptions / Errors
- XPathEvaluationException
- Exception thrown when calling an XPath function or evaluating an expression fails.
- XPathParserException
- Exception thrown when parsing of an XPath expression fails.