ILSParser.ParseWithContext(ILSInput, INode, Int16) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Parse an XML fragment from a resource identified by a <code>LSInput</code> and insert the content into an existing document at the position specified with the <code>context</code> and <code>action</code> arguments.
[Android.Runtime.Register("parseWithContext", "(Lorg/w3c/dom/ls/LSInput;Lorg/w3c/dom/Node;S)Lorg/w3c/dom/Node;", "GetParseWithContext_Lorg_w3c_dom_ls_LSInput_Lorg_w3c_dom_Node_SHandler:Org.W3c.Dom.LS.ILSParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.W3c.Dom.INode? ParseWithContext (Org.W3c.Dom.LS.ILSInput? input, Org.W3c.Dom.INode? contextArg, short action);
[<Android.Runtime.Register("parseWithContext", "(Lorg/w3c/dom/ls/LSInput;Lorg/w3c/dom/Node;S)Lorg/w3c/dom/Node;", "GetParseWithContext_Lorg_w3c_dom_ls_LSInput_Lorg_w3c_dom_Node_SHandler:Org.W3c.Dom.LS.ILSParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ParseWithContext : Org.W3c.Dom.LS.ILSInput * Org.W3c.Dom.INode * int16 -> Org.W3c.Dom.INode
Parameters
- input
- ILSInput
The <code>LSInput</code> from which the source document is to be read. The source document must be an XML fragment, i.e. anything except a complete XML document (except in the case where the context node of type <code>DOCUMENT_NODE</code>, and the action is <code>ACTION_REPLACE_CHILDREN</code>), a DOCTYPE (internal subset), entity declaration(s), notation declaration(s), or XML or text declaration(s).
- contextArg
- INode
The node that is used as the context for the data that is being parsed. This node must be a <code>Document</code> node, a <code>DocumentFragment</code> node, or a node of a type that is allowed as a child of an <code>Element</code> node, e.g. it cannot be an <code>Attribute</code> node.
- action
- Int16
This parameter describes which action should be taken between the new set of nodes being inserted and the existing children of the context node. The set of possible actions is defined in <code>ACTION_TYPES</code> above.
Returns
Return the node that is the result of the parse operation. If the result is more than one top-level node, the first one is returned.
- Attributes
Exceptions
HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be
inserted before, after, or as a child of the context node (see also
Node.insertBefore or Node.replaceChild in []
).
NOT_SUPPORTED_ERR: Raised if the LSParser doesn't
support this method, or if the context node is of type
Document and the DOM implementation doesn't support
the replacement of the DocumentType child or
Element child.
NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a
read only node and the content is being appended to its child list,
or if the parent node of the context node is read only node and the
content is being inserted in its child list.
INVALID_STATE_ERR: Raised if the LSParser.busy
attribute is true.
PARSE_ERR: Raised if the LSParser was unable to load
the XML fragment. DOM applications should attach a
DOMErrorHandler using the parameter "" if they wish to get details on the error.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.