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

This code example shows how to use the following methods:setSystemId
 
  /** DomHelper for this TreeWalker          */ 
  final protected DOM2Helper m_dh;
         
  /** Locator object for this TreeWalker          */ 
  final private LocatorImpl m_locator = new LocatorImpl();
 
  /** 
   * Get the ContentHandler used for the tree walk. 
   * 
   * @return the ContentHandler used for the tree walk 
   */ 
  public ContentHandler getContentHandler()
  { 
    return m_contentHandler;
  } 
   
  public TreeWalker(ContentHandler ch) {
      this(ch,null);
  } 

7
CodeRank
This code example shows how to use the following methods:getColumnNumber, getLineNumber, getPublicId, getSystemId
This code example shows how to use the following methods:setColumnNumber, setLineNumber, setPublicId, setSystemId
    public static final int ROW = 1;
 
    public static final int COL = 2;
 
    public void testSAXParseException_String_Locator_Exception() { 
        LocatorImpl l = new LocatorImpl();
        l.setPublicId(PUB);
        l.setSystemId(SYS);
        l.setLineNumber(ROW);
        l.setColumnNumber(COL);
 
        Exception c = new Exception();
 
        // Ordinary case 
        SAXParseException e = new SAXParseException(ERR, l, c);
 
        assertEquals(ERR, e.getMessage());
        assertEquals(c, e.getException());
 
        assertEquals(PUB, e.getPublicId());
6
CodeRank
This code example shows how to use the following methods:setSystemId
 
  /** DomHelper for this TreeWalker          */ 
  protected DOMHelper m_dh;
         
        /** Locator object for this TreeWalker          */ 
        private LocatorImpl m_locator = new LocatorImpl();
 
  /** 
   * Get the ContentHandler used for the tree walk. 
   * 
   * @return the ContentHandler used for the tree walk 
   */ 
  public ContentHandler getContentHandler()
  { 
    return m_contentHandler;
  } 
 
  /** 
   * Get the ContentHandler used for the tree walk. 
   * 

6
CodeRank
This code example shows how to use the following methods:setColumnNumber, setLineNumber, setPublicId, setSystemId
This code example shows how to use the following methods:getEncoding, getXMLVersion, getColumnNumber, getLineNumber, getPublicId
This code example shows how to use the following methods:setColumnNumber, setLineNumber, setPublicId, setSystemId
This code example shows how to use the following methods:setColumnNumber, setLineNumber, setPublicId, setSystemId
    static void convertToSAXParseException(XMLParseException e) throws SAXException {
        Exception ex = e.getException();
        if (ex == null) {
            // must be a parser exception; mine it for locator info and throw 
            // a SAXParseException 
            LocatorImpl locatorImpl = new LocatorImpl();
            locatorImpl.setPublicId(e.getPublicId());
            locatorImpl.setSystemId(e.getExpandedSystemId());
            locatorImpl.setLineNumber(e.getLineNumber());
            locatorImpl.setColumnNumber(e.getColumnNumber());
            throw new SAXParseException(e.getMessage(), locatorImpl);
        } 
        if (ex instanceof SAXException) {
            // why did we create an XMLParseException? 
            throw (SAXException) ex;
        } 
        throw new SAXException(ex);
    } 
     
    static void convertToSAXException(XNIException e) throws SAXException {
6
CodeRank
This code example shows how to use the following methods:setSystemId
 
  /** DomHelper for this TreeWalker          */ 
  final protected DOM2Helper m_dh;
         
  /** Locator object for this TreeWalker          */ 
  final private LocatorImpl m_locator = new LocatorImpl();
 
  /** 
   * Get the ContentHandler used for the tree walk. 
   * 
   * @return the ContentHandler used for the tree walk 
   */ 
  public ContentHandler getContentHandler()
  { 
    return m_contentHandler;
  } 
   
  public TreeWalker(ContentHandler ch) {
      this(ch,null);
  } 

6
CodeRank
This code example shows how to use the following methods:
 
    /** 
     * The constructor. 
     */ 
    public DocumentFragment() { 
        super(new LocatorImpl()); 
    } 
 
    /** 
     *  
     * @see nu.validator.saxtree.Node#visit(nu.validator.saxtree.TreeParser) 
     */ 
    @Override void visit(TreeParser treeParser) { 
        // nothing 
    } 
 
    /** 
     *  
     * @see nu.validator.saxtree.Node#getNodeType() 
     */ 
5
CodeRank
See Code Examples for Java 8 LocatorImpl Methods: