Package org.apache.xerces.dom

Examples of org.apache.xerces.dom.DOMExceptionImpl


   
    public void insertNode(Node newNode)
        throws DOMException, RangeException
    {
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMException.INVALID_STATE_ERR,
      "DOM011 Invalid state");
      }
        int type = newNode.getNodeType();
        if (type == Node.ATTRIBUTE_NODE
View Full Code Here


        throws DOMException, RangeException
    {
        if (newParent==null) return;
       
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMException.INVALID_STATE_ERR,
      "DOM011 Invalid state");
      }
        int type = newParent.getNodeType();
        if (type == Node.ATTRIBUTE_NODE
View Full Code Here

      selectNode(newParent);
    }
       
    public Range cloneRange(){
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMException.INVALID_STATE_ERR,
      "DOM011 Invalid state");
      }
       
        Range range = fDocument.createRange();
View Full Code Here

        return range;
    }
   
    public String toString(){
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMException.INVALID_STATE_ERR,
      "DOM011 Invalid state");
      }
     
      Node node = fStartContainer;
View Full Code Here

    }
   
    void checkIndex(Node refNode, int offset) throws DOMException
    {
        if (offset < 0) {
        throw new DOMExceptionImpl(
          DOMException.INDEX_SIZE_ERR,
      "DOM004 Index out of bounds");
      }

        int type = refNode.getNodeType();
       
        if((type == Node.TEXT_NODE
        || type == Node.CDATA_SECTION_NODE
        || type == Node.COMMENT_NODE
        || type == Node.PROCESSING_INSTRUCTION_NODE)
        && offset > refNode.getNodeValue().length()){
        throw new DOMExceptionImpl(
          DOMException.INDEX_SIZE_ERR,
      "DOM004 Index out of bounds");
        }
       
        Node child = refNode.getFirstChild();
        int i = 1;
        for (; child != null; i++) {
            child = child.getNextSibling();
        }
        if (i > offset) {
        throw new DOMExceptionImpl(
          DOMException.INDEX_SIZE_ERR,
      "DOM004 Index out of bounds");
        }
           
    }
View Full Code Here

     *  If there is no next node which passes these criteria, then return null.
     */
    public Node               nextNode() {
       
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMExceptionImpl.INVALID_STATE_ERR,
      "DOM011 Invalid state");
        }
       
        // if root is null there is no next node.
View Full Code Here

     *  _backwards_ depth-first order which also passes the filter, and whatToShow.
     */
    public Node               previousNode() {
       
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMExceptionImpl.INVALID_STATE_ERR,
      "DOM011 Invalid state");
        }
        // if the root is null, or the current node is null, return null.
View Full Code Here

     *  If there is no next node which passes these criteria, then return null.
     */
    public Node               nextNode() {
       
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMExceptionImpl.INVALID_STATE_ERR,
            "INVALID_STATE_ERR");
        }
       
        // if root is null there is no next node.
View Full Code Here

     *  _backwards_ depth-first order which also passes the filter, and whatToShow.
     */
    public Node               previousNode() {
       
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMExceptionImpl.INVALID_STATE_ERR,
            "INVALID_STATE_ERR");
        }
        // if the root is null, or the current node is null, return null.
View Full Code Here

   
    public void setStart(Node refNode, int offset)
                         throws RangeException, DOMException
    {
      if( fDetach) {
        throw new DOMExceptionImpl(
          DOMException.INVALID_STATE_ERR,
      "DOM011 Invalid state");
        }
        if ( !isAncestorTypeValid(refNode)) {
        throw new RangeExceptionImpl(
View Full Code Here

TOP

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

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.