Class DOM2toSAX2


  • public class DOM2toSAX2
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.xml.sax.ContentHandler handler  
      private static java.lang.String XMLNS_URI  
    • Constructor Summary

      Constructors 
      Constructor Description
      DOM2toSAX2()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.xml.sax.Attributes convertAttributes​(org.w3c.dom.Element e)
      converts DOM attributes into SAX attributes.
      org.xml.sax.ContentHandler getContentHandler()  
      private static java.lang.String nullAdjust​(java.lang.String s)  
      protected void onElement​(org.w3c.dom.Element e)  
      protected void onText​(org.w3c.dom.Text t)  
      void setContentHandler​(org.xml.sax.ContentHandler handler)  
      void traverse​(org.w3c.dom.Document dom)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • handler

        protected org.xml.sax.ContentHandler handler
    • Constructor Detail

      • DOM2toSAX2

        public DOM2toSAX2()
    • Method Detail

      • setContentHandler

        public void setContentHandler​(org.xml.sax.ContentHandler handler)
      • getContentHandler

        public org.xml.sax.ContentHandler getContentHandler()
      • traverse

        public void traverse​(org.w3c.dom.Document dom)
                      throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • convertAttributes

        protected org.xml.sax.Attributes convertAttributes​(org.w3c.dom.Element e)
        converts DOM attributes into SAX attributes.
      • onElement

        protected void onElement​(org.w3c.dom.Element e)
                          throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • onText

        protected void onText​(org.w3c.dom.Text t)
                       throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • nullAdjust

        private static java.lang.String nullAdjust​(java.lang.String s)