All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dom3.org.w3c.dom.CDATASection Maven / Gradle / Ivy

Go to download

Xerces2 provides high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces continues to build upon the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 provides fully conforming XML Schema 1.0 and 1.1 processors. An experimental implementation of the "XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010)" is also provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

There is a newer version: 2.12.2
Show newest version
/*
 * Copyright (c) 2003 World Wide Web Consortium,
 *
 * (Massachusetts Institute of Technology, European Research Consortium for
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
 * work is distributed under the W3C(r) Software License [1] in the hope that
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
 */

package org.w3c.dom;

/**
 * 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 may 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). *

Note: 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. *

Note: 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. */ public interface CDATASection extends Text { }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy