IResolvedDocument.GetFragment MethodIResolvedDocument.GetFragment MethodIResolvedDocument::GetFragment Method
- XmlPrime 4.1
- Other Versions ▼
Syntax
Function GetFragment( _ fragment As String _ ) As System.Xml.XPath.XPathNavigator
System.Xml.XPath.XPathNavigator GetFragment( string fragment )
System.Xml.XPath::XPathNavigator^ GetFragment( String^ fragment )
Parameters
- fragment
Type: System.StringSystem.StringSystem::String^
The fragment identifier.
Return Value
Type: System.Xml.XPath.XPathNavigatorSystem.Xml.XPath.XPathNavigatorSystem.Xml.XPath::XPathNavigator^
A XPathNavigatorXPathNavigatorXPathNavigator instance pointing at the node referred to by fragment.
Exceptions
Exception | Condition |
XdmExceptionXdmExceptionXdmException |
An XTRE1160 error is raised if the media type is not supported, or if the fragment is invalid for this media type.
|
Remarks
Currently fragments are supported only for the XML media types. These are text/xml
, application/xml
and
*/*+xml
where * represents a series of characters. In this case only NCName fragments are resolved. If the fragment
identifier is an XPointer expression or is not a valid NCName then a XTRE1160
XdmExceptionXdmExceptionXdmException is raised.
If the media type of this document is not known (MediaTypeMediaTypeMediaType is null
a null reference (Nothing
in Visual Basic)
nullptr
) then it is assumed to be
text/xml
, but if any errors would be raised then the root of the document is returned instead.