public String getValue(int index) { return (fAttributes !=null)?fAttributes.item(index).getNodeValue():""; }
@Override public Node cloneNode(boolean deep) { OdfElement cloneElement = ((OdfFileDom) this.ownerDocument).newOdfElement(this.getClass()); if (attributes != null) { for (int i = 0; i < attributes.getLength(); i++) { Node item = attributes.item(i); String qname = null; String prefix = item.getPrefix(); if (prefix == null) { qname = item.getLocalName(); } else { qname = prefix + ":" + item.getLocalName(); } cloneElement.setAttributeNS(item.getNamespaceURI(), qname, item.getNodeValue()); } } if (deep) { Node childNode = getFirstChild(); while (childNode != null) { cloneElement.appendChild(childNode.cloneNode(true)); childNode = childNode.getNextSibling(); } } return cloneElement; }
@Override public Node cloneNode(boolean deep) { OdfElement cloneElement = this.cloneOdfElement(); if (attributes != null) { for (int i = 0; i < attributes.getLength(); i++) { Node item = attributes.item(i); String qname = null; String prefix = item.getPrefix(); if (prefix == null) { qname = item.getLocalName(); cloneElement.setAttribute(qname, item.getNodeValue()); } else { qname = prefix + ":" + item.getLocalName(); cloneElement.setAttributeNS(item.getNamespaceURI(), qname, item.getNodeValue()); } } } if (deep) { Node childNode = getFirstChild(); while (childNode != null) { cloneElement.appendChild(childNode.cloneNode(true)); childNode = childNode.getNextSibling(); } } return cloneElement; }
@Override public Node cloneNode(boolean deep) { OdfElement cloneElement = this.cloneOdfElement(); if (attributes != null) { for (int i = 0; i < attributes.getLength(); i++) { Node item = attributes.item(i); String qname = null; String prefix = item.getPrefix(); if (prefix == null) { qname = item.getLocalName(); cloneElement.setAttribute(qname, item.getNodeValue()); } else { qname = prefix + ":" + item.getLocalName(); cloneElement.setAttributeNS(item.getNamespaceURI(), qname, item.getNodeValue()); } } } if (deep) { Node childNode = getFirstChild(); while (childNode != null) { cloneElement.appendChild(childNode.cloneNode(true)); childNode = childNode.getNextSibling(); } } return cloneElement; }
if ( attributes!=null ) { for ( int i=0; i<attributes.getLength(); ++i ) { Attr attr = (Attr)attributes.item(i);
Node attr = attributes.item(i); attr.normalize();