public Document createDocument() throws XMLPlatformException { try { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(true); DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); return documentBuilder.newDocument(); } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
public Document createDocument() throws XMLPlatformException { try { DocumentBuilder documentBuilder = getDocumentBuilderFactory().newDocumentBuilder(); return documentBuilder.newDocument(); } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
@Override public Document createDocument() throws XMLPlatformException { try { DocumentBuilder documentBuilder = getDocumentBuilderFactory().newDocumentBuilder(); return documentBuilder.newDocument(); } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
public Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException { 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 Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException { 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 Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException { try { Document document = null; if (null == systemIdentifier) { document = createDocument(); Element rootElement = document.createElement(name); document.appendChild(rootElement); return document; } DocumentBuilder documentBuilder = getDocumentBuilderFactory().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); } }
@Override public Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException { try { Document document = null; if (null == systemIdentifier) { document = createDocument(); Element rootElement = document.createElement(name); document.appendChild(rootElement); return document; } DocumentBuilder documentBuilder = getDocumentBuilderFactory().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 Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException { try { if (null == publicIdentifier) { return createDocumentWithSystemIdentifier(name, systemIdentifier); } DocumentBuilder documentBuilder = getDocumentBuilderFactory().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); } }
@Override public Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException { try { if (null == publicIdentifier) { return createDocumentWithSystemIdentifier(name, systemIdentifier); } DocumentBuilder documentBuilder = getDocumentBuilderFactory().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 Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException { try { if (null == systemIdentifier) { Document document = createDocument(); Element rootElement = document.createElement(name); document.appendChild(rootElement); return document; } XMLDocument xmlDocument = (XMLDocument)createDocument(); Element rootElement = xmlDocument.createElement(name); xmlDocument.appendChild(rootElement); xmlDocument.setDoctype(name, systemIdentifier, null); return xmlDocument; } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
@Override public Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException { try { if (null == systemIdentifier) { Document document = createDocument(); Element rootElement = document.createElement(name); document.appendChild(rootElement); return document; } XMLDocument xmlDocument = (XMLDocument)createDocument(); Element rootElement = xmlDocument.createElement(name); xmlDocument.appendChild(rootElement); xmlDocument.setDoctype(name, systemIdentifier, null); return xmlDocument; } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
@Override public Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException { try { XMLDocument xmlDocument = (XMLDocument)createDocument(); Element rootElement = xmlDocument.createElement(name); xmlDocument.appendChild(rootElement); xmlDocument.setDoctype(name, systemIdentifier, publicIdentifier); return xmlDocument; } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }
public Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException { try { XMLDocument xmlDocument = (XMLDocument)createDocument(); Element rootElement = xmlDocument.createElement(name); xmlDocument.appendChild(rootElement); xmlDocument.setDoctype(name, systemIdentifier, publicIdentifier); return xmlDocument; } catch (Exception e) { throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e); } }