|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--com.faa.sax.util.IndentHandler
Constructor Summary | |
IndentHandler(boolean newTabs,
int newIndent,
int newFill,
int newAttributes,
int newLineOffset,
boolean newAlignFirstLine,
java.io.PrintStream newOut)
Create a new Indentation Handler that will output the document according with the specified format. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
output the characters, taking care of auto-filling and indenting. |
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw)
Output the end element tag. |
void |
error(org.xml.sax.SAXParseException ex)
Error. |
void |
fatalError(org.xml.sax.SAXParseException ex)
Fatal error. |
protected java.lang.String |
normalize(java.lang.String s)
Normalize the given string |
void |
printCharacters()
print the characters on buffer, taking care of filling and indenting issues |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Insert the processing instruction, indented. |
void |
startDocument()
Start document. |
void |
startElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw,
org.xml.sax.Attributes attrs)
Print indented start tag and organize attributes accordingly |
void |
warning(org.xml.sax.SAXParseException ex)
Warning. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument,
endPrefixMapping,
ignorableWhitespace,
notationDecl,
resolveEntity,
setDocumentLocator,
skippedEntity,
startPrefixMapping,
unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public IndentHandler(boolean newTabs, int newIndent, int newFill, int newAttributes, int newLineOffset, boolean newAlignFirstLine, java.io.PrintStream newOut)
newTabs
- whether to use tabs for the indentation (or spaces)newIndent
- the amount of indentation characters per levelnewFill
- auto-fill text at given column. No autofill if 0newLineOffset
- if using autofill, use this as left offsetnewAlignWithStart
- if auto-filling, align running text with start
or end of the tagnewAlignFirstLine
- if auto-filling, start of text in the following
linenewOut
- output streamIndent
Method Detail |
public void startDocument()
public void startElement(java.lang.String uri, java.lang.String local, java.lang.String raw, org.xml.sax.Attributes attrs)
uri
- the ns part of the qnamelocal
- the local part of the qnameraw
- the complete, raw nameatts
- the attributes for the elementpublic void endElement(java.lang.String uri, java.lang.String local, java.lang.String raw)
uri
- of the qnamepublic void printCharacters()
public void characters(char[] ch, int start, int length)
ch[]
- the whole stream of characterspublic void processingInstruction(java.lang.String target, java.lang.String data)
target
- PI Targetprotected java.lang.String normalize(java.lang.String s)
s
- The string to normalizepublic void warning(org.xml.sax.SAXParseException ex)
public void error(org.xml.sax.SAXParseException ex)
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |