![]()
|
Xerces 3.1.1 API: Class TextSerializer
|
Constructor Summary | |
Method Summary | |
void |
int start,
int length)
|
protected void |
boolean unescaped)
|
void |
int start,
int length)
|
void |
|
Must be called by a method about to print any type of content. |
|
void |
|
void |
java.lang.String localName,
java.lang.String rawName)
|
protected java.lang.String |
|
void |
java.lang.String code)
|
protected void |
|
protected void |
|
void |
|
protected void |
|
void |
|
void |
java.lang.String localName,
java.lang.String rawName,
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public TextSerializer()
Method Detail |
format
- The output format to usepublic void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName,
The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.
This event allows up to three name components for each element:
Any or all of these may be provided, depending on the properties:
Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations property is true (it is false by default, and support for a
uri
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName
- The qualified name (with prefix), or the
empty string if qualified names are not available.atts
- The attributes attached to the element. If
there are no attributes, it shall be an empty
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName)
The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding event (even when the element is empty).
uri
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName
- The qualified XML 1.0 name (with prefix), or the
wrapping another exception.public void startElement(java.lang.String tagName,
The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.
If the element name has a namespace prefix, the prefix will still be attached. Note that the attribute list provided will contain only attributes with explicit values (specified or
public void endElement(java.lang.String tagName)
The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).
If the element name has a namespace prefix, the prefix will
public void processingInstruction(java.lang.String target, java.lang.String code)
The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.
A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.
target
- The processing instruction target.data
- The processing instruction data, or null if
none was supplied. The data does not include any
wrapping another exception.public void comment(java.lang.String text)
public void comment(char[] chars, int start, int length)
This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read).
public void characters(char[] chars, int start, int length)
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.
The application must not attempt to read from the array outside of the specified range.
Note that some parsers will report whitespace in element method rather than this one (validating parsers must do so).
protected void characters(java.lang.String text, boolean unescaped)
protected void startDocument(java.lang.String rootTagName)
will serialize the document type declaration, and will serialize all pre-root comments and PIs that were accumulated in the document this is not the first root element of the document.
protected void serializeElement(Element elem)
elem
- The element to serializeprotected void serializeNode(Node node)
node
- The node to serializeprotected java.lang.String getEntityRef(char ch)
ch
- Character value
|
Xerces 3.1.1 | ||||||||
FRAMES NO FRAMES | |||||||||
DETAIL: FIELD | CONSTR | METHOD |