Java 8 DocumentHandler - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DocumentHandler class.

This code example shows how to use the following methods:endDocument, startDocument
 
        if (handler == null) return;
 
 
 
        handler.startDocument();
 
        processChildren(document, handler);
 
        handler.endDocument();
 
 
 
    } //-- process(Document, DocumentHandler) 
 
 
 
    /** 
 
     * Breaks down the given node into it's corresponding SAX events 
5
CodeRank
This code example shows how to use the following methods:characters
  } 
   
  public void characters(char ch[], int start, int length)
    throws SAXException 
  { 
    handler.characters(ch, start, length);
  } 
   
  public void ignorableWhitespace(char ch[], int start, int length)
    throws SAXException 
  { 
    handler.ignorableWhitespace(ch, start, length);
  } 
   
  public void processingInstruction (String target, String data)
    throws SAXException 
  { 
    handler.processingInstruction(target, data);
  } 
   
4
CodeRank
This code example shows how to use the following methods:ignorableWhitespace
     * to the proxy that is provided, printing debugging information before 
     * doing the proxy. 
     */ 
    public void ignorableWhitespace(final char[] ch, final int start, final int length) throws org.xml.sax.SAXException {
        if (_handler != null) {
            _handler.ignorableWhitespace(ch, start, length);
        } 
    } 
 
    /** 
     * {@inheritDoc} Proxies the 
     * org.sax.xml.DocumentHandler#processingInstruction(String, String) request 
     * to the proxy that is provided, printing debugging information before 
     * doing the proxy. 
     */ 
    public void processingInstruction(final String target, final String data) throws org.xml.sax.SAXException {
        try { 
            _out.write("--#processingInstruction\n");
            _out.write("target: ");
            _out.write(target);
4
CodeRank
This code example shows how to use the following methods:ignorableWhitespace
 
  /** SAX DocumentHandler API. */ 
  public void ignorableWhitespace(char[] ch, int start, int length)
    throws SAXException { 
    if (documentHandler != null) {
      documentHandler.ignorableWhitespace(ch,start,length);
    } 
  } 
 
  /** SAX DocumentHandler API. */ 
  public void processingInstruction(String target, String pidata)
    throws SAXException { 
 
    if (target.equals("oasis-xml-catalog")) {
      URL catalog = null;
      String data = pidata;
 
      int pos = data.indexOf("catalog=");
      if (pos >= 0) {
	data = data.substring(pos+8);
4
CodeRank
This code example shows how to use the following methods:characters
     * @see org.xml.sax.ContentHandler#characters(char[], int, int) 
     */ 
    public void characters(char[] chars, int start, int length)
        throws SAXException 
    { 
        _handler.characters(chars, start, length);
    } 
 
    /** 
     * @see org.xml.sax.ContentHandler#endDocument() 
     */ 
    public void endDocument() 
        throws SAXException 
    { 
        _handler.endDocument();
    } 
 
    /** 
     * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, 
     *      java.lang.String) 
4
CodeRank
This code example shows how to use the following methods:ignorableWhitespace
 
    public void ignorableWhitespace( char[] ch, int offset, int length )
	throws SAXException 
    { 
	if ( _redirect != null ) {
	    _redirect.ignorableWhitespace( ch, offset, length );
	} 
    } 
 
 
    public void processingInstruction( String target, String instruction )
	throws SAXException 
    { 
	if ( _redirect != null ) {
	    _redirect.processingInstruction( target, instruction );
	} 
    } 
 
 
    public void startDocument() 
4
CodeRank
This code example shows how to use the following methods:startElement
   { 
      if (nsPrefix != null) {
         name = nsPrefix + ':' + name;
      } 
 
      this.saxDocumentHandler.startElement(name, this.saxAttributes);
   } 
 
 
   /** 
    * This method is called when the end of an XML elemnt is encountered. 
    * 
    * @see #startElement 
    * 
    * @param name the name of the element 
    * @param nsPrefix the prefix used to identify the namespace 
    * @param nsSystemId the system ID associated with the namespace 
    */ 
   public void endElement(String name,
                          String nsPrefix,
3
CodeRank
See Code Examples for Java 8 DocumentHandler Methods: