|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cyberneko.html.filters.DefaultFilter
org.cyberneko.html.filters.Identity
public class Identity
This filter performs the identity operation of the original document event stream generated by the HTML scanner by removing events that are synthesized by the tag balancer. This operation is essentially the same as turning off tag-balancing in the parser. However, this filter is useful when you want the tag balancer to report "errors" but do not want the synthesized events in the output.
Note: This filter requires the augmentations feature to be turned on. For example:
XMLParserConfiguration parser = new HTMLConfiguration(); parser.setFeature("http://cyberneko.org/html/features/augmentations", true);
Note: This isn't exactly the identify transform because the element and attributes names may have been modified from the original document. For example, by default, NekoHTML converts element names to upper-case and attribute names to lower-case.
Field Summary | |
---|---|
protected static java.lang.String |
AUGMENTATIONS
Augmentations feature identifier. |
protected static java.lang.String |
FILTERS
Filters property identifier. |
Fields inherited from class org.cyberneko.html.filters.DefaultFilter |
---|
fDocumentHandler, fDocumentSource |
Constructor Summary | |
---|---|
Identity()
|
Method Summary | |
---|---|
void |
emptyElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
Empty element. |
void |
endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
End element. |
void |
startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
Start element. |
protected static boolean |
synthesized(org.apache.xerces.xni.Augmentations augs)
Returns true if the information provided is synthesized. |
Methods inherited from class org.cyberneko.html.filters.DefaultFilter |
---|
characters, comment, doctypeDecl, endCDATA, endDocument, endGeneralEntity, endPrefixMapping, getDocumentHandler, getDocumentSource, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, ignorableWhitespace, merge, processingInstruction, reset, setDocumentHandler, setDocumentSource, setFeature, setProperty, startCDATA, startDocument, startDocument, startGeneralEntity, startPrefixMapping, textDecl, xmlDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String AUGMENTATIONS
protected static final java.lang.String FILTERS
Constructor Detail |
---|
public Identity()
Method Detail |
---|
public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
startElement
in interface org.apache.xerces.xni.XMLDocumentHandler
startElement
in class DefaultFilter
org.apache.xerces.xni.XNIException
public void emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
emptyElement
in interface org.apache.xerces.xni.XMLDocumentHandler
emptyElement
in class DefaultFilter
org.apache.xerces.xni.XNIException
public void endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
endElement
in interface org.apache.xerces.xni.XMLDocumentHandler
endElement
in class DefaultFilter
org.apache.xerces.xni.XNIException
protected static boolean synthesized(org.apache.xerces.xni.Augmentations augs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |