*/
public XdmNode wrap(Object node) throws IllegalArgumentException {
ExternalObjectModel model = config.findExternalObjectModel(node);
DocumentInfo doc = model.wrapDocument(node, (baseURI == null ? null : baseURI.toString()), config);
NodeInfo wrappedNode = model.wrapNode(doc, node);
return (XdmNode)XdmItem.wrapItem(wrappedNode);
}
// public static void main(String[] args) {
// String validXML = "<!DOCTYPE a [<!ELEMENT a EMPTY>]><a/>";