ICDATASection Interface
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.
CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
[Android.Runtime.Register("org/w3c/dom/CDATASection", "", "Org.W3c.Dom.ICDATASectionInvoker")]
public interface ICDATASection : IDisposable, Java.Interop.IJavaPeerable, Org.W3c.Dom.IText
[<Android.Runtime.Register("org/w3c/dom/CDATASection", "", "Org.W3c.Dom.ICDATASectionInvoker")>]
type ICDATASection = interface
interface IText
interface ICharacterData
interface INode
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Attributes
- Implements
Remarks
CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup. The only delimiter that is recognized in a CDATA section is the "]]>" string that ends the CDATA section. CDATA sections cannot be nested. Their primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.
The CharacterData.data
attribute holds the text that is contained by the CDATA section. Note that this <em>may</em> contain characters that need to be escaped outside of CDATA sections and that, depending on the character encoding ("charset") chosen for serialization, it may be impossible to write out some characters as part of a CDATA section.
The CDATASection
interface inherits from the CharacterData
interface through the Text
interface. Adjacent CDATASection
nodes are not merged by use of the normalize
method of the Node
interface.
No lexical check is done on the content of a CDATA section and it is therefore possible to have the character sequence "]]>"
in the content, which is illegal in a CDATA section per section 2.7 of [XML 1.0]. The presence of this character sequence must generate a fatal error during serialization or the cdata section must be splitted before the serialization (see also the parameter "split-cdata-sections"
in the DOMConfiguration
interface). <p ><b>Note:</b> Because no markup is recognized within a CDATASection
, character numeric references cannot be used as an escape mechanism when serializing. Therefore, action needs to be taken when serializing a CDATASection
with a character encoding where some of the contained characters cannot be represented. Failure to do so would not produce well-formed XML. <p ><b>Note:</b> One potential solution in the serialization process is to end the CDATA section before the character, output the character using a character reference or entity reference, and open a new CDATA section for any further characters in the text node. Note, however, that some code conversion libraries at the time of writing do not return an error or exception when a character is missing from the encoding, making the task of ensuring that data is not corrupted on serialization more difficult.
See also the Document Object Model (DOM) Level 3 Core Specification.
Java documentation for org.w3c.dom.CDATASection
.
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.
Fields
AttributeNode |
The node is an |
CdataSectionNode |
The node is a |
CommentNode |
The node is a |
DocumentFragmentNode |
The node is a |
DocumentNode |
The node is a |
DocumentPositionContainedBy |
The node is contained by the reference node. (Inherited from INode) |
DocumentPositionContains |
The node contains the reference node. (Inherited from INode) |
DocumentPositionDisconnected |
The two nodes are disconnected. (Inherited from INode) |
DocumentPositionFollowing |
The node follows the reference node. (Inherited from INode) |
DocumentPositionImplementationSpecific |
The determination of preceding versus following is implementation-specific. (Inherited from INode) |
DocumentPositionPreceding |
The second node precedes the reference node. (Inherited from INode) |
DocumentTypeNode |
The node is a |
ElementNode |
The node is an |
EntityNode |
The node is an |
EntityReferenceNode |
The node is an |
NotationNode |
The node is a |
ProcessingInstructionNode |
The node is a |
TextNode |
The node is a |
Properties
Attributes |
A |
BaseURI |
The absolute base URI of this node or |
ChildNodes |
A |
Data |
The character data of the node that implements this interface. (Inherited from ICharacterData) |
FirstChild |
The first child of this node. (Inherited from INode) |
Handle |
Gets the JNI value of the underlying Android object. (Inherited from IJavaObject) |
HasAttributes |
Returns whether this node (if it is an element) has any attributes. (Inherited from INode) |
HasChildNodes |
Returns whether this node has any children. (Inherited from INode) |
IsElementContentWhitespace |
Returns whether this text node contains , often abusively called "ignorable whitespace". (Inherited from IText) |
JniIdentityHashCode |
Returns the value of |
JniManagedPeerState |
State of the managed peer. (Inherited from IJavaPeerable) |
JniPeerMembers |
Member access and invocation support. (Inherited from IJavaPeerable) |
LastChild |
The last child of this node. (Inherited from INode) |
Length |
The number of 16-bit units that are available through |
LocalName |
Returns the local part of the qualified name of this node. (Inherited from INode) |
NamespaceURI |
The namespace URI of this node, or |
NextSibling |
The node immediately following this node. (Inherited from INode) |
NodeName |
The name of this node, depending on its type; see the table above. (Inherited from INode) |
NodeType |
A code representing the type of the underlying object, as defined above. (Inherited from INode) |
NodeValue |
The value of this node, depending on its type; see the table above. (Inherited from INode) |
OwnerDocument |
The |
ParentNode |
The parent of this node. (Inherited from INode) |
PeerReference |
Returns a JniObjectReference of the wrapped Java object instance. (Inherited from IJavaPeerable) |
Prefix |
The namespace prefix of this node, or |
PreviousSibling |
The node immediately preceding this node. (Inherited from INode) |
TextContent |
This attribute returns the text content of this node and its descendants. (Inherited from INode) |
WholeText |
Returns all text of |
Methods
AppendChild(INode) |
Adds the node |
AppendData(String) |
Append the string to the end of the character data of the node. (Inherited from ICharacterData) |
CloneNode(Boolean) |
Returns a duplicate of this node, i. (Inherited from INode) |
CompareDocumentPosition(INode) |
Compares the reference node, i. (Inherited from INode) |
DeleteData(Int32, Int32) |
Remove a range of 16-bit units from the node. (Inherited from ICharacterData) |
Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
GetFeature(String, String) |
This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in . (Inherited from INode) |
GetUserData(String) |
Retrieves the object associated to a key on a this node. (Inherited from INode) |
InsertBefore(INode, INode) |
Inserts the node |
InsertData(Int32, String) |
Insert a string at the specified 16-bit unit offset. (Inherited from ICharacterData) |
IsDefaultNamespace(String) |
This method checks if the specified |
IsEqualNode(INode) |
Tests whether two nodes are equal. (Inherited from INode) |
IsSameNode(INode) |
Returns whether this node is the same node as the given one. (Inherited from INode) |
IsSupported(String, String) |
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in . (Inherited from INode) |
LookupNamespaceURI(String) |
Look up the namespace URI associated to the given prefix, starting from this node. (Inherited from INode) |
LookupPrefix(String) |
Look up the prefix associated to the given namespace URI, starting from this node. (Inherited from INode) |
Normalize() |
Puts all |
RemoveChild(INode) |
Removes the child node indicated by |
ReplaceChild(INode, INode) |
Replaces the child node |
ReplaceData(Int32, Int32, String) |
Replace the characters starting at the specified 16-bit unit offset with the specified string. (Inherited from ICharacterData) |
ReplaceWholeText(String) |
Replaces the text of the current node and all logically-adjacent text nodes with the specified text. (Inherited from IText) |
SetJniIdentityHashCode(Int32) |
Set the value returned by |
SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
SetPeerReference(JniObjectReference) |
Set the value returned by |
SetUserData(String, Object, IUserDataHandler) |
Associate an object to a key on this node. (Inherited from INode) |
SplitText(Int32) |
Breaks this node into two nodes at the specified |
SubstringData(Int32, Int32) |
Extracts a range of data from the node. (Inherited from ICharacterData) |
UnregisterFromRuntime() |
Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations. (Inherited from IJavaPeerable) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |