Class XmlAttributeEncodingFilter

  • All Implemented Interfaces:
    org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLDocumentFilter, org.apache.xerces.xni.parser.XMLDocumentSource, org.apache.xerces.xni.XMLDocumentHandler, org.cyberneko.html.HTMLComponent

    public class XmlAttributeEncodingFilter
    extends org.cyberneko.html.filters.DefaultFilter
    A Cyberneko filter to cope with a common mistake made by plugin developers in Confluence. Attribute values should be HTML encoded so values such as URLs with multiple query parameters (e.g. http://www.example.org?name=bob&hat=bowler) should have the ampersand encoded. If it isn't then a STAX parser will thing that &hat is a malformed entity definition.
    • Field Summary

      • Fields inherited from class org.cyberneko.html.filters.DefaultFilter

        fDocumentHandler, fDocumentSource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void emptyElement​(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)  
      void startElement​(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)  
      • Methods inherited from class org.cyberneko.html.filters.DefaultFilter

        characters, comment, doctypeDecl, endCDATA, endDocument, endElement, endGeneralEntity, endPrefixMapping, getDocumentHandler, getDocumentSource, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, ignorableWhitespace, merge, processingInstruction, reset, setDocumentHandler, setDocumentSource, setFeature, setProperty, startCDATA, startDocument, startDocument, startGeneralEntity, startPrefixMapping, textDecl, xmlDecl
    • Constructor Detail

      • XmlAttributeEncodingFilter

        public XmlAttributeEncodingFilter()
    • Method Detail

      • startElement

        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
        Specified by:
        startElement in interface org.apache.xerces.xni.XMLDocumentHandler
        Overrides:
        startElement in class org.cyberneko.html.filters.DefaultFilter
        Throws:
        org.apache.xerces.xni.XNIException
      • emptyElement

        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
        Specified by:
        emptyElement in interface org.apache.xerces.xni.XMLDocumentHandler
        Overrides:
        emptyElement in class org.cyberneko.html.filters.DefaultFilter
        Throws:
        org.apache.xerces.xni.XNIException