IDocument.NormalizeDocument Method

Definition

This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.

[Android.Runtime.Register("normalizeDocument", "()V", "GetNormalizeDocumentHandler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void NormalizeDocument ();
[<Android.Runtime.Register("normalizeDocument", "()V", "GetNormalizeDocumentHandler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member NormalizeDocument : unit -> unit
Attributes

Remarks

This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. As a consequence, this method updates the replacement tree of EntityReference nodes and normalizes Text nodes, as defined in the method Node.normalize(). <br> Otherwise, the actual result depends on the features being set on the Document.domConfig object and governing what operations actually take place. Noticeably this method could also make the document namespace well-formed according to the algorithm described in , check the character normalization, remove the CDATASection nodes, etc. See DOMConfiguration for details.

// Keep in the document
            the information defined // in the XML Information Set (Java example)
            DOMConfiguration docConfig = myDocument.getDomConfig();
            docConfig.setParameter("infoset", Boolean.TRUE);
            myDocument.normalizeDocument();

<br>Mutation events, when supported, are generated to reflect the changes occurring on the document. <br> If errors occur during the invocation of this method, such as an attempt to update a read-only node or a Node.nodeName contains an invalid character according to the XML version in use, errors or warnings (DOMError.SEVERITY_ERROR or DOMError.SEVERITY_WARNING) will be reported using the DOMErrorHandler object associated with the "error-handler " parameter. Note this method might also report fatal errors ( DOMError.SEVERITY_FATAL_ERROR) if an implementation cannot recover from an error.

Added in DOM Level 3.

Java documentation for org.w3c.dom.Document.normalizeDocument().

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.

Applies to