org.openxri.util
Class DOM3Utils

java.lang.Object
  extended by org.openxri.util.DOM3Utils

public class DOM3Utils
extends java.lang.Object

This class provides utilities such that DOM3 is not needed at runtime if a Xerces DOM2 compliant DOM is used. DOM3 is required to build this class.

Author:
=chetan

Constructor Summary
DOM3Utils()
           
 
Method Summary
static void bestEffortAdopt(org.w3c.dom.Document oDoc, org.w3c.dom.Node oNode)
          Attempts to adopt the node into the document
static void bestEffortSetIDAttr(org.w3c.dom.Element oElem, java.lang.String sNS, java.lang.String sAttr)
          Makes a best effort at setting the ID attribute so that it can be looked up using Document::getElementsById
static boolean hasDOM3Support()
          Returns true iF DOM3 is available at runtime
static boolean isXercesDocument(org.w3c.dom.Document oDoc)
          Returns true if specified Document is backed by Xerces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOM3Utils

public DOM3Utils()
Method Detail

hasDOM3Support

public static boolean hasDOM3Support()
Returns true iF DOM3 is available at runtime


isXercesDocument

public static boolean isXercesDocument(org.w3c.dom.Document oDoc)
Returns true if specified Document is backed by Xerces


bestEffortAdopt

public static void bestEffortAdopt(org.w3c.dom.Document oDoc,
                                   org.w3c.dom.Node oNode)
Attempts to adopt the node into the document


bestEffortSetIDAttr

public static void bestEffortSetIDAttr(org.w3c.dom.Element oElem,
                                       java.lang.String sNS,
                                       java.lang.String sAttr)
Makes a best effort at setting the ID attribute so that it can be looked up using Document::getElementsById



Copyright © 2005-2012. All Rights Reserved.