Package org.allcolor.xml.parser.dom

Examples of org.allcolor.xml.parser.dom.CAttr


   * @throws DOMException DOCUMENT ME!
   */
  public Attr setAttributeNode(final Attr anewAttr)
    throws DOMException {
    isReadOnly();
    CAttr newAttr = (CAttr)anewAttr;
    if (newAttr == null) {
      return null;
    } // end if
    if (newAttr.parentNode != null &&
      newAttr.parentNode != this) {
      throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,newAttr.getOwnerElement().toString());
    }
   
    if (newAttr.ownerDocument != ownerDocument && newAttr.ownerDocument != null)
      throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,"Invalid parent document.");
    Attr oldAttr = null;
    if (newAttr.localName != null)
      oldAttr = (Attr) (listAttributes == null ? null : listAttributes.getNamedItemNS(newAttr.getNamespaceURI(),newAttr.localName));
    else
      oldAttr = (Attr) getAttributeNode(newAttr.name);

    if (oldAttr == null && newAttr.localName == null)
      oldAttr = (Attr)(listAttributes == null ? null : listAttributes.getNamedItem(newAttr.name));
View Full Code Here


    isReadOnly();
    if (oldAttr == null) {
      throw new DOMException(DOMException.NOT_FOUND_ERR,"Attribute is null.");
    } // end if

    CAttr attri = null;
    if (oldAttr.getLocalName() == null) {
      attri = (CAttr)getAttributeNode(oldAttr.getName());
    } else {
      attri = (CAttr)getAttributeNodeNS(oldAttr.getNamespaceURI(),oldAttr.getLocalName());
    }
View Full Code Here

      if (listAttributes.getLength() > 0) {
        result.append(" ");
      } // end if
 
      for (int i=0;i<listAttributes.getLength();i++) {
        CAttr attr = (CAttr) listAttributes.item(i);
        result.append(attr.toString());
 
        if (i < listAttributes.getLength()-1) {
          result.append(" ");
        } // end if
      } // end while
View Full Code Here

TOP

Related Classes of org.allcolor.xml.parser.dom.CAttr

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.