Package com.sun.org.apache.xerces.internal.dom

Examples of com.sun.org.apache.xerces.internal.dom.DeferredAttrImpl


    Element elem = doc.getDocumentElement();

    // pega todos os elementos 'item' do XML ====================
    NodeList nl = elem.getElementsByTagName("item");
    DeferredAttrImpl def = null;
    HashMap<String, String> atribs = null;

    // percorre cada elemento 'item' encontrado
    for( int i=0; i<nl.getLength(); i++ ) {
      Element tag = (Element) nl.item(i);

      int id = getAtributo(tag, "id", 0);
      if(id>0){
        atribs = new HashMap<String, String>();
        for(int j=0; j<tag.getAttributes().getLength(); j++){
          def = (DeferredAttrImpl) tag.getAttributes().item(j);
          atribs.put(def.getName(), def.getValue());
        }
        elementos.put(id, atribs);
      }
    }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xerces.internal.dom.DeferredAttrImpl

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.