All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.tools.xjc.reader.dtd.bindinfo.DOMUtil Maven / Gradle / Ivy

There is a newer version: 4.0.5
Show newest version
package com.sun.tools.xjc.reader.dtd.bindinfo;

import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

/**
 * @author Kohsuke Kawaguchi
 */
public final class DOMUtil {
    final static String getAttribute(Element e,String attName) {
        if(e.getAttributeNode(attName)==null)   return null;
        return e.getAttribute(attName);
    }

    public static String getAttribute(Element e, String nsUri, String local) {
        if(e.getAttributeNodeNS(nsUri,local)==null) return null;
        return e.getAttributeNS(nsUri,local);
    }

    public static Element getElement(Element e, String nsUri, String localName) {
        NodeList l = e.getChildNodes();
        for(int i=0;i getChildElements(Element e) {
        List r = new ArrayList();
        NodeList l = e.getChildNodes();
        for(int i=0;i getChildElements(Element e,String localName) {
        List r = new ArrayList();
        NodeList l = e.getChildNodes();
        for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy