public void readFromNode(Node d){
  super.readFromNode(d);
  TargetNamespace=DOMUtils.getStringAttribute(d,"TargetNamespace");
  NamedNodeMap attribs=d.getAttributes();
  for (int i=0; i < attribs.getLength(); i++) {
    Node attrib=attribs.item(i);
    String ns=attrib.getNodeName();
    String nv=attrib.getNodeValue();
    if (ns.startsWith("xmlns:")) {
      nameSpaceMap.put(ns.substring(6),nv);
    }
  }
  for (  Node n : DOMUtils.getChildrenByName(d,"opc:Constant")) {
    Constant c=new Constant();
    c.readFromNode(n);
    constants.add(c);
  }
  for (  Node n : DOMUtils.getChildrenByName(d,"opc:TypeDeclaration")) {
    TypeDeclaration c=new TypeDeclaration();
    c.readFromNode(n);
    typeDeclarations.add(c);
  }
  for (  Node n : DOMUtils.getChildrenByName(d,"opc:ComplexType")) {
    ComplexType c=new ComplexType();
    c.readFromNode(n);
    complexTypes.add(c);
    baseTypes.add(c);
  }
  for (  Node n : DOMUtils.getChildrenByName(d,"opc:EnumeratedType")) {
    EnumeratedType e=new EnumeratedType();
    e.readFromNode(n);
    enumerationTypes.add(e);
  }
  for (  Node n : DOMUtils.getChildrenByName(d,"opc:ServiceType")) {
    ServiceType e=new ServiceType();
    e.readFromNode(n);
    serviceTypes.add(e);
    baseTypes.add(e.Request);
    baseTypes.add(e.Response);
  }
}

public void readFromNode ( Node d ) { super . readFromNode ( d ) ; TargetNamespace = DOMUtils . getStringAttribute ( d , "TargetNamespace" ) ; NamedNodeMap attribs = d . getAttributes ( ) ; for ( int i = 0 ; i < attribs . getLength ( ) ; i ++ ) { Node attrib = attribs . item ( i ) ; String ns = attrib . getNodeName ( ) ; String nv = attrib . getNodeValue ( ) ; if ( ns . startsWith ( "xmlns:" ) ) { nameSpaceMap . put ( ns . substring ( 6 ) , nv ) ; } } for ( Node n : DOMUtils . getChildrenByName ( d , "opc:Constant" ) ) { Constant c = new Constant ( ) ; c . readFromNode ( n ) ; constants . add ( c ) ; } for ( Node n : DOMUtils . getChildrenByName ( d , "opc:TypeDeclaration" ) ) { TypeDeclaration c = new TypeDeclaration ( ) ; c . readFromNode ( n ) ; typeDeclarations . add ( c ) ; } for ( Node n : DOMUtils . getChildrenByName ( d , "opc:ComplexType" ) ) { ComplexType c = new ComplexType ( ) ; c . readFromNode ( n ) ; complexTypes . add ( c ) ; baseTypes . add ( c ) ; } for ( Node n : DOMUtils . getChildrenByName ( d , "opc:EnumeratedType" ) ) { EnumeratedType e = new EnumeratedType ( ) ; e . readFromNode ( n ) ; enumerationTypes . add ( e ) ; } for ( Node n : DOMUtils . getChildrenByName ( d , "opc:ServiceType" ) ) { ServiceType e = new ServiceType ( ) ; e . readFromNode ( n ) ; serviceTypes . add ( e ) ; baseTypes . add ( e . Request ) ; baseTypes . add ( e . Response ) ; } }
reads content from a xml dom
