Package org.apache.xerces.dom

Examples of org.apache.xerces.dom.NodeImpl


                                   int standAloneIndex)
   {
     //super.startDocument( versionIndex, encodingIndex,
     //                               standAloneIndex);
     super.startDocument();
     NodeImpl node = null ;
      try {
      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
      //System.out.println( "The node = " + node );
      }
     catch( org.xml.sax.SAXException ex )
      {
        System.err.println( "except" + ex );;
      }
    
//     NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
     if( node != null )
          node.setUserDataString.valueOf( getLocator().getLineNumber() ) ); // Save location String into node
  } //startDocument
View Full Code Here


   public void startElement(QName elementQName, XMLAttributes attrList)
    throws SAXException {
      super.startElement(elementQName, attrList);

      NodeImpl node = null;
      try {
      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
      //System.out.println( "The node = " + node );  TODO JEFF
      }
      catch( org.xml.sax.SAXException ex )
      {
          System.err.println( "except" + ex );;
      }
      //NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
      if( node != null )
          node.setUserDataString.valueOf( fEntityManager.getEntityScanner().getLineNumber() ) ); // Save location String into node
   } //startElement
View Full Code Here

   public void startDocument() throws SAXException {
     //super.startDocument( versionIndex, encodingIndex,
     //                               standAloneIndex);
     super.startDocument();
     NodeImpl node = null ;
      try {
      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
      //System.out.println( "The node = " + node );
      }
     catch( org.xml.sax.SAXException ex )
      {
        System.err.println( "except" + ex );;
      }
    
//     NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
     if( node != null )
          node.setUserDataString.valueOf( fEntityManager.getEntityScanner().getLineNumber() ) ); // Save location String into node
  } //startDocument
View Full Code Here


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here

            // version is used, the startDocument method above will not be called and locator will hence be null.
            // Tell the users this so that they don't get a stupid NPE.
            if (this.locator == null)
                throw new RuntimeException("Error: locator is null. Check that you have the correct version of Xerces (such as the one that comes with Cocoon) in your endorsed library path.");

            NodeImpl node = null;
            try {
                node = (NodeImpl) this.getProperty("http://apache.org/xml/properties/dom/current-element-node");
            } catch (org.xml.sax.SAXException ex) {
                System.err.println("except" + ex);
            }
            if (node != null) {
                String location = locator.getLiteralSystemId() + ":" + locator.getLineNumber() + ":" + locator.getColumnNumber();
                node.setUserData("location", location, null);
            }
        }
View Full Code Here


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here

            super.startElement(qName, xmlAttributes, augmentations);
            setLocation();
        }

        private final void setLocation() {
            NodeImpl node = null;
            try {
                node = (NodeImpl) this.getProperty("http://apache.org/xml/properties/dom/current-element-node");
            } catch (org.xml.sax.SAXException ex) {
                System.err.println("except" + ex);
            }
            if (node != null) {
                String location = locator.getLiteralSystemId() + ": line " + locator.getLineNumber();
                node.setUserData("location", location, null);
            }
        }
View Full Code Here


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here

TOP

Related Classes of org.apache.xerces.dom.NodeImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.