Code example for Attr

Methods: getNodeValue

0
        Attr a = (Attr) nnm.getNamedItem(attrName);
        if (a == null)
        { 
            throw new AmqpParseException("Node \"" + n.getNodeName() + "\" has no attribute \"" + attrName + "\".");
        } 
        return a.getNodeValue();
    } 
 
    public static int getNamedIntegerAttribute(Node n, String attrName) throws AmqpParseException
    { 
        return Integer.parseInt(getNamedAttribute(n, attrName));
    } 
 
    // Element functions 
 
    public static Node findChild(Node n, String eltName) throws AmqpParseException
    { 
        NodeList nl = n.getChildNodes();
        for (int i = 0; i < nl.getLength(); i++)
        { 
            Node cn = nl.item(i);