FileDocCategorySizeDatePackage
DOMInputSource.javaAPI DocApache Xerces 3.0.12337Fri Sep 14 20:33:54 BST 2007org.apache.xerces.util

DOMInputSource

public final class DOMInputSource extends org.apache.xerces.xni.parser.XMLInputSource

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

version
$Id: DOMInputSource.java 447241 2006-09-18 05:12:57Z mrglavas $

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;