Demos and Usage of org.w3c.dom.Document.getDocumentElement()


   1: package test.at.gv.egovernment.moa.util;
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.NodeList;
   4:         ...
   5: 
   6:   private Document doc1;
   7: 
   8:         ...
   9:       XPathUtils.selectNodeList(
  10:         doc1.getDocumentElement(),
  11:         ...
  12:         doc1.getDocumentElement(),

View Full Code Here
   1:       DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
   2:       Document doc = xdb.newDocument();
   3:       
   4:         ...
   5:       Envelope msgEnv = Envelope.unmarshall( 
   6:                           doc.getDocumentElement());
   7: 
   8:       URL url = new URL(

View Full Code Here
   1:         File webXmlFile = new File(filename);
   2:         Document webXmlDocument = buildXmlDocument(webXmlFile);
   3:         return getInitializationParametersAsMap(webXmlDocument);
   4:         ...
   5: 
   6:     private Document buildXmlDocument(File file)
   7:         throws Exception {
   8:         ...
   9:     private Map getInitializationParametersAsMap(
  10:         Document webXmlDocument) throws TransformerException {
  11: 
  12:         ...
  13:             .selectNodeList(
  14:                 webXmlDocument.getDocumentElement(),

View Full Code Here
   1: import org.w3c.dom.NodeList;
   2: import org.w3c.dom.Document;
   3: 
   4:         ...
   5: 
   6:           Document messageDoc = XMLUtil.getInstance().createDocument(
   7:              patternConnectionUrl.openStream());
   8:         ...
   9:              outDirectory, XMLUtil.getInstance().findElement(
  10:              messageDoc.getDocumentElement(),
  11:              "patternFiles"));

View Full Code Here
   1: 
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.Element;
   4:         ...
   5: 
   6:   private Document parse(String fileName) throws Exception {
   7:     return DOMUtils.parseDocument(
   8:         ...
   9: 
  10:   private Document parsePlain(String fileName) throws Exception {
  11:     return DOMUtils.parseDocument(
  12:         ...
  13:       DOMUtils.validateElement(
  14:         doc.getDocumentElement(),

View Full Code Here
   1: import org.w3c.dom.NodeList;
   2: import org.w3c.dom.Document;
   3: 
   4:         ...
   5: 
   6:       Document messageDoc = XMLUtil.getInstance().createDocument(
   7:          patternConnectionUrl.openStream());
   8:         ...
   9:          outDirectory, XMLUtil.getInstance().findElement(
  10:          messageDoc.getDocumentElement(),
  11:          "patternFiles"));

View Full Code Here
   1:          javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
   2:          org.w3c.dom.Document doc = db.parse(in);
   3:          Element nscontext = XMLUtils.createDSctx(doc, "x",
   4:         ...
   5:          NodeList nsList = XPathAPI.selectNodeList(
   6:             doc.getDocumentElement(),
   7:          Canonicalizer can =
   8:             Canonicalizer
   9:                .getInstance(Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);

View Full Code Here
   1: 
   2: import org.w3c.dom.Document;
   3: 
   4:         ...
   5: 
   6:                     Document assertionDoc = builder.parse(
   7:                             new ByteArrayInputStream(
   8:         ...
   9:                     assertions.add(SignedXACMLAttributeAssertion.getInstance(
  10:                                 assertionDoc.getDocumentElement()));
  11:                     

View Full Code Here
   1: import org.ietf.jgss.GSSContext;
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.Element;
   4:         ...
   5:         WSSConfig wssConfig = WSSConfig.getDefaultWSConfig();
   6:         Document doc = EnvelopeConverter.getInstance().toDocument(env);
   7:         SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(
   8:         ...
   9:             doc.getDocumentElement());

View Full Code Here
   1: 
   2:       Document doc = dbf.newDocumentBuilder ().parse (new File (inFile));
   3: 
   4:         ...
   5:       DOMSignContext dsc = new DOMSignContext (kp.getPrivate (),
   6:                                                doc.getDocumentElement());
   7: 
   8:         ...
   9: 
  10:       Document doc = dbf.newDocumentBuilder ().parse (new File (inFile));

View Full Code Here
   1: import org.w3c.dom.NamedNodeMap;
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.DocumentType;
   4:         ...
   5: 
   6:         Document contentDOM = null;
   7:         try {
   8:         ...
   9:         bodyNode = contentDOM.createElement("body");
  10:         contentDOM.getDocumentElement().appendChild(headNode);
  11:         headNode.appendChild(titleNode);
  12:         ...
  13:         contentDOM.getDocumentElement().appendChild(bodyNode);

View Full Code Here
   1:     {
   2:         Document document = getParser().getDocument();
   3:         ...
   4:         serializeDocument( document, entries, os );
   5:     }
   6:         ...
   7: 
   8:         document.getDocumentElement().
   9:         ...
  10:         insertBefore( comment, document.getDocumentElement().getFirstChild() );

View Full Code Here
   1: import org.w3c.dom.DOMException;
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.NamedNodeMap;
   4:         ...
   5:     public void xmlAssertIsomorphicContent(
   6:                                 org.w3c.dom.Document documentOne, 
   7:         ...
   8:                                 org.w3c.dom.Document documentTwo)
   9:                                     throws 
  10:         ...
  11:                                         AssertionFailedError {
  12:         log("Testing documents:" + documentOne.getDocumentElement().getNodeName() 

View Full Code Here
   1: import org.w3c.dom.Element;
   2: import org.w3c.dom.Document;
   3: 
   4:         ...
   5: import org.xmloperator.framework.document.compare.ElementCharacterization;
   6:         ...
   7: import org.xmloperator.framework.document.compare.ElementCharacterizationAccess;
   8: import org.xmloperator.framework.document.compare.ElementAssociation;
   9:         ...
  10:   public void computeElementCharacterizations() throws CancelException {
  11:     this.computeElementCharacterizations(this.document1.getDocumentElement());

View Full Code Here
   1: import java.io.ObjectInputStream;
   2: import org.w3c.dom.Document;
   3: import org.w3c.dom.Attr;
   4:         ...
   5: 
   6:   protected org.w3c.dom.Element createColorElement(Document doc) {
   7:     org.w3c.dom.Element colorElement = doc.createElement("color");
   8:         ...
   9: 
  10:   protected org.w3c.dom.Element createPointTypeElement(Document doc,
  11:                                                        String name,
  12:         ...
  13:   
  14:       doc.getDocumentElement().appendChild(lineElement); 

View Full Code Here