public void printXML(PrintWriter pw, String pad, boolean constrained) {

        pw.print(pad + "<" + getTypeName());
        if (_nameClear != null) {
            pw.print(" name=\"" +
                    DDSXMLParser.normalizeToXML(_nameClear) + "\"");
        }

        Enumeration e = getAttributeNames();
        if (e.hasMoreElements()) {
            pw.println(">");
            while (e.hasMoreElements()) {
                String aName = (String) e.nextElement();

                Attribute a = getAttribute(aName);
                if(a!=null)
                    a.printXML(pw, pad + "\t", constrained);

            }
            pw.println(pad + "</" + getTypeName() + ">");
        } else {
            pw.println("/>");
        }


    }
public void printXML ( PrintWriter pw , String pad , boolean constrained ) { pw . print ( pad + "<" + getTypeName ( ) ) ; if ( _nameClear != null ) { pw . print ( " name=\"" + DDSXMLParser . normalizeToXML ( _nameClear ) + "\"" ) ; } Enumeration e = getAttributeNames ( ) ; if ( e . hasMoreElements ( ) ) { pw . println ( ">" ) ; while ( e . hasMoreElements ( ) ) { String aName = ( String ) e . nextElement ( ) ; Attribute a = getAttribute ( aName ) ; if ( a != null ) a . printXML ( pw , pad + "\t" , constrained ) ; } pw . println ( pad + "</" + getTypeName ( ) + ">" ) ; } else { pw . println ( "/>" ) ; } }
@param pw
@param pad
@param constrained
@opendap.ddx.experimental