FileDocCategorySizeDatePackage
DOMInputSource.javaAPI DocJava SE 6 API2117Tue Jun 10 00:22:50 BST 2008com.sun.org.apache.xerces.internal.util

DOMInputSource

public final class DOMInputSource extends XMLInputSource

An XMLInputSource analogue to javax.xml.transform.dom.DOMSource.

version
$Id: DOMInputSource.java,v 1.1.4.1 2005/09/05 07:45:34 neerajbj Exp $

Fields Summary
private Node
fNode
Constructors Summary
public DOMInputSource()

        this(null);
    
public DOMInputSource(Node node)

        super(null, getSystemIdFromNode(node), null);
        fNode = node;
    
public DOMInputSource(Node node, String systemId)

        super(null, systemId, null);
        fNode = node;
    
Methods Summary
public org.w3c.dom.NodegetNode()

        return fNode;
    
private static java.lang.StringgetSystemIdFromNode(org.w3c.dom.Node node)

        if (node != null) {
            try {
                return node.getBaseURI();
            }
            // If the DOM implementation is DOM Level 2 
            // then a NoSuchMethodError will be thrown.
            // Just ignore it.
            catch (NoSuchMethodError e) {
                return null;
            }
            // There was a failure for some other reason
            // Ignore it as well.
            catch (Exception e) {
                return null;
            }
        }
        return null;
    
public voidsetNode(org.w3c.dom.Node node)

        fNode = node;