24 import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
25 import com.sun.org.apache.xerces.internal.impl.xs.opti.ElementImpl;
26 import java.util.Map;
27 import org.w3c.dom.Attr;
28 import org.w3c.dom.DOMException;
29 import org.w3c.dom.Document;
30 import org.w3c.dom.Element;
31 import org.w3c.dom.NamedNodeMap;
32 import org.w3c.dom.Node;
33 import org.w3c.dom.ls.LSException;
34
35 /**
36 * Some useful utility methods.
37 * This class was modified in Xerces2 with a view to abstracting as
38 * much as possible away from the representation of the underlying
39 * parsed structure (i.e., the DOM). This was done so that, if Xerces
40 * ever adopts an in-memory representation more efficient than the DOM
41 * (such as a DTM), we should easily be able to convert our schema
42 * parsing to utilize it.
43 *
44 * @version $Id: DOMUtil.java,v 1.7 2010-11-01 04:40:14 joehw Exp $
45 */
46 public class DOMUtil {
47
48 //
49 // Constructors
50 //
51
52 /** This class cannot be instantiated. */
53 protected DOMUtil() {}
54
55 //
56 // Public static methods
57 //
58
59 /**
60 * Copies the source tree into the specified place in a destination
61 * tree. The source node and its children are appended as children
62 * of the destination node.
63 * <p>
64 * <em>Note:</em> This is an iterative implementation.
|
24 import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
25 import com.sun.org.apache.xerces.internal.impl.xs.opti.ElementImpl;
26 import java.util.Map;
27 import org.w3c.dom.Attr;
28 import org.w3c.dom.DOMException;
29 import org.w3c.dom.Document;
30 import org.w3c.dom.Element;
31 import org.w3c.dom.NamedNodeMap;
32 import org.w3c.dom.Node;
33 import org.w3c.dom.ls.LSException;
34
35 /**
36 * Some useful utility methods.
37 * This class was modified in Xerces2 with a view to abstracting as
38 * much as possible away from the representation of the underlying
39 * parsed structure (i.e., the DOM). This was done so that, if Xerces
40 * ever adopts an in-memory representation more efficient than the DOM
41 * (such as a DTM), we should easily be able to convert our schema
42 * parsing to utilize it.
43 *
44 */
45 public class DOMUtil {
46
47 //
48 // Constructors
49 //
50
51 /** This class cannot be instantiated. */
52 protected DOMUtil() {}
53
54 //
55 // Public static methods
56 //
57
58 /**
59 * Copies the source tree into the specified place in a destination
60 * tree. The source node and its children are appended as children
61 * of the destination node.
62 * <p>
63 * <em>Note:</em> This is an iterative implementation.
|