Java 8 LexicalHandler - 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 LexicalHandler class.

This code example shows how to use the following methods:endCDATA, startCDATA
			lh = (pHandler instanceof LexicalHandler) ? (LexicalHandler) pHandler : null;
		} else { 
			lh = null;
		} 
		if (lh != null) {
			lh.startCDATA();
		} 
		pHandler.characters(pValue.toCharArray(), 0, pValue.length());
		if (lh != null) {
			lh.endCDATA();
		} 
	} 
 
	/** Converts the given node <code>pNode</code> into a 
	 * stream of SAX events, which are fired into the 
	 * content handler <code>pHandler</code>. 
	 * @param pNode The node being serialized. 
	 * @param pHandler The target handler. 
	 * @throws SAXException The target handler reported an error. 
	 */ 
6
CodeRank
This code example shows how to use the following methods:endDTD, startDTD
     * @see nu.validator.htmlparser.impl.TreeBuilder#appendDoctypeToDocument(java.lang.String, java.lang.String, java.lang.String) 
     */ 
    @Override 
    protected void appendDoctypeToDocument(String name, String publicIdentifier, String systemIdentifier) throws SAXException {
        if (lexicalHandler != null) {
            lexicalHandler.startDTD(name, publicIdentifier, systemIdentifier);
            lexicalHandler.endDTD();
        } 
    } 
 
    /** 
     * @see nu.validator.htmlparser.impl.TreeBuilder#elementPopped(String, java.lang.String, java.lang.Object) 
     */ 
    @Override 
    protected void elementPopped(String ns, String name, Attributes node) throws SAXException {
        contentHandler.endElement(ns, name, name);
    } 
 
    /** 
     * @see nu.validator.htmlparser.impl.TreeBuilder#elementPushed(String, java.lang.String, java.lang.Object) 
5
CodeRank
This code example shows how to use the following methods:startCDATA
            lexicalHandler.endEntity(name);
    } 
 
    public void startCDATA() throws SAXException {
        if (lexicalHandler != null)
            lexicalHandler.startCDATA();
    } 
 
    public void endCDATA() throws SAXException {
        if (lexicalHandler != null)
            lexicalHandler.endCDATA();
    } 
 
    public void comment(char[] ch, int start, int length) throws SAXException {
        if (lexicalHandler != null)
            lexicalHandler.comment(ch, start, length);
    } 
 
    public boolean endDocumentCalled() { 
        return contentHandler == null;
5
CodeRank
This code example shows how to use the following methods:startCDATA
            lexicalHandler.endEntity(name);
    } 
 
    public void startCDATA() throws SAXException {
        if (forwardLexical)
            lexicalHandler.startCDATA();
    } 
 
    public void endCDATA() throws SAXException {
        if (forwardLexical)
            lexicalHandler.endCDATA();
    } 
 
    public void comment(char[] ch, int start, int length) throws SAXException {
        if (forwardLexical)
            lexicalHandler.comment(ch, start, length);
    } 
} 
5
CodeRank
This code example shows how to use the following methods:endEntity
        lexicalHandler.startEntity(name);
    } 
 
    public void endEntity(String name)
    throws SAXException {
        lexicalHandler.endEntity(name);
    } 
 
    public void startCDATA() 
    throws SAXException {
        lexicalHandler.startCDATA();
    } 
 
    public void endCDATA() 
    throws SAXException {
        lexicalHandler.endCDATA();
    } 
 
    public void comment(char ch[], int start, int len)
    throws SAXException {
4
CodeRank
This code example shows how to use the following methods:comment
    } 
 
    @Override 
    public void comment(char ch[], int start, int length) throws SAXException {
        if (lh != null) {
            lh.comment(ch, start, length);
        } 
    } 
} 
5
CodeRank
This code example shows how to use the following methods:endCDATA, startCDATA
        return (false); 
    } 
 
    public boolean enter(CDATASection cdata) {
        try { 
            lexical_.startCDATA();
            String data = cdata.getData();
            content_.characters(data.toCharArray(), 0, data.length());
            lexical_.endCDATA();
        } catch (SAXException e) {
            _errorReport(e);
        } 
        return (false); 
    } 
 
    public boolean enter(EntityReference entityRef) {
        try { 
            lexical_.startEntity(entityRef.getNodeName());
        } catch (SAXException e) {
            _errorReport(e);
5
CodeRank
This code example shows how to use the following methods:endCDATA, startCDATA
        return (false); 
    } 
 
    public boolean enter(CDATASection cdata) {
        try { 
            lexical_.startCDATA();
            String data = cdata.getData();
            content_.characters(data.toCharArray(), 0, data.length());
            lexical_.endCDATA();
        } catch (SAXException e) {
            _errorReport(e);
        } 
        return (false); 
    } 
 
    public boolean enter(EntityReference entityRef) {
        try { 
            lexical_.startEntity(entityRef.getNodeName());
        } catch (SAXException e) {
            _errorReport(e);
5
CodeRank
This code example shows how to use the following methods:endDTD
    /** 
     * Implements org.xml.sax.ext.LexicalHandler.endDTD() 
     */ 
    public void endDTD() throws SAXException { 
	if (_lexHandler != null) {
	    _lexHandler.endDTD();
	} 
    } 
 
    /** 
     * Implements org.xml.sax.ext.LexicalHandler.startEntity() 
     */ 
    public void startEntity(String name) throws SAXException { 
	if (_lexHandler != null) {
	    _lexHandler.startEntity(name);
	} 
    } 
 
    /** 
     * Implements org.xml.sax.ext.LexicalHandler.endEntity() 
5
CodeRank
This code example shows how to use the following methods:startCDATA
 
    @Override 
    public void startCDATA() throws SAXException
    { 
        if (this.lexicalHandler != null) {
            this.lexicalHandler.startCDATA();
        } 
    } 
 
    @Override 
    public void startDTD(String name, String publicId, String systemId) throws SAXException
    { 
        if (this.lexicalHandler != null) {
            this.lexicalHandler.startDTD(name, publicId, systemId);
        } 
    } 
 
    @Override 
    public void startEntity(String name) throws SAXException
4
CodeRank
See Code Examples for Java 8 LexicalHandler Methods: