All pastes #973961 Raw Edit

Untitled

public text v1 · immutable
·published 2008-04-06 13:21 UTC
rendered paste body
Code creating the document:
 
     Document xmldoc;
     DocumentBuilderFactory factory;
     DocumentBuilder builder;

     public EPPDocument() {
          try {
              factory = DocumentBuilderFactory.newInstance();
              builder = factory.newDocumentBuilder();
              impl = builder.getDOMImplementation();
  
              xmldoc = impl.createDocument("urn:ietf:params:xml:ns:epp-1.0", "epp", null);
  
              root = xmldoc.getDocumentElement();
  
              root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
              root.setAttribute("xsi:schemaLocation", "urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd");
  
          } catch (Exception e) {
              System.out.println("Something failed while creating the XML document.");
          }
     }