Methods Summary |
---|
public org.w3c.dom.Document | createDocument()
try {
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
return documentBuilder.newDocument();
} catch (Exception e) {
throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e);
}
|
public org.w3c.dom.Document | createDocumentWithPublicIdentifier(java.lang.String name, java.lang.String publicIdentifier, java.lang.String systemIdentifier)
try {
if (null == publicIdentifier) {
return createDocumentWithSystemIdentifier(name, systemIdentifier);
}
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
DOMImplementation domImpl = documentBuilder.getDOMImplementation();
DocumentType docType = domImpl.createDocumentType(name, publicIdentifier, systemIdentifier);
Document document = domImpl.createDocument(null, name, docType);
return document;
} catch (Exception e) {
throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e);
}
|
public org.w3c.dom.Document | createDocumentWithSystemIdentifier(java.lang.String name, java.lang.String systemIdentifier)
try {
Document document = null;
if (null == systemIdentifier) {
document = createDocument();
Element rootElement = document.createElement(name);
document.appendChild(rootElement);
return document;
}
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
DOMImplementation domImpl = documentBuilder.getDOMImplementation();
DocumentType docType = domImpl.createDocumentType(name, null, systemIdentifier);
document = domImpl.createDocument(null, name, docType);
return document;
} catch (Exception e) {
throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e);
}
|
public boolean | isWhitespaceNode(org.w3c.dom.Text text)
String value = text.getNodeValue();
if (null == value) {
return false;
} else {
return value.trim().equals("");
}
|
public oracle.toplink.essentials.platform.xml.XMLParser | newXMLParser()
return new JAXPParser();
|
public oracle.toplink.essentials.platform.xml.XMLTransformer | newXMLTransformer()
return new JAXPTransformer();
|
public java.lang.String | resolveNamespacePrefix(org.w3c.dom.Node contextNode, java.lang.String namespacePrefix)
if (namespacePrefix.equals(contextNode.getPrefix())) {
return contextNode.getNamespaceURI();
}
if (contextNode.getNodeType() == Node.ELEMENT_NODE) {
Element contextElement = (Element)contextNode;
Attr namespaceDeclaration = contextElement.getAttributeNode("xmlns:" + namespacePrefix);
if (null != namespaceDeclaration) {
return namespaceDeclaration.getValue();
}
}
Node parentNode = contextNode.getParentNode();
if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
return resolveNamespacePrefix((Element)parentNode, namespacePrefix);
}
return null;
|
public org.w3c.dom.NodeList | selectNodesAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPath, oracle.toplink.essentials.platform.xml.XMLNamespaceResolver xmlNamespaceResolver)Execute advanced XPath statements that are required for TopLink EIS.
throw oracle.toplink.essentials.exceptions.ValidationException.operationNotSupported("selectNodesAdvanced");
|
public org.w3c.dom.Node | selectSingleNodeAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPath, oracle.toplink.essentials.platform.xml.XMLNamespaceResolver xmlNamespaceResolver)Execute advanced XPath statements that are required for TopLink EIS.
throw oracle.toplink.essentials.exceptions.ValidationException.operationNotSupported("selectSingleNodeAdvanced");
|
public boolean | validateDocument(org.w3c.dom.Document document, java.net.URL xmlSchemaURL, org.xml.sax.ErrorHandler errorHandler)
return true;
|