Code example for Node

Methods: getFirstChild

0
     *         is a parsing error) 
     *  
     * @throws ParsingException if the hostname is invalid 
     */ 
    public static DNSNameAttribute getInstance(Node root) throws ParsingException {
        return getInstance(root.getFirstChild().getNodeValue());
    } 
 
    /** 
     * Returns a new <code>DNSNameAttribute</code> that represents the name indicated by the 
     * <code>String</code> provided. 
     *  
     * @param value a string representing the name 
     *  
     * @return a new <code>DNSNameAttribute</code> 
     *  
     * @throws ParsingException if the hostname is invalid 
     */ 
    public static DNSNameAttribute getInstance(String value) throws ParsingException {
        int portSep = value.indexOf(':');