/** * Creates a new Document object * @throws ParserConfigurationException */ public static Document newDocument() { return createDocument(); } public static Document createDocument() {
/** * Creates a new Docuement object * @return * @throws ParserConfigurationException */ public static Document newDocument() { return createDocument(); } public static Document createDocument() {
/** * Creates a new Document object * @throws ParserConfigurationException */ public static Document newDocument() { return createDocument(); } public static Document createDocument() {
/** * Creates a new Docuement object * @return * @throws ParserConfigurationException */ public static Document newDocument() { return createDocument(); } public static Document createDocument() {
/** * Creates a new Docuement object * @return * @throws ParserConfigurationException */ public static Document newDocument() { return createDocument(); } public static Document createDocument() {
/** * Returns the detail node. If no detail node has been set, an empty * <code><detail></code> is created. * * @return the detail node. */ public Element getOrCreateDetail() { if (detail == null) { detail = DOMUtils.createDocument().createElement("detail"); } return detail; }
public static Document transform(Templates xsltTemplate, Document in) { try { DOMSource beforeSource = new DOMSource(in); Document out = DOMUtils.createDocument(); Transformer trans = xsltTemplate.newTransformer(); trans.transform(beforeSource, new DOMResult(out)); return out; } catch (TransformerException e) { throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage()); } } }
public Document getDocument(Definition wsdlDef) throws WSDLException { Element el = getElement(wsdlDef); Document doc = DOMUtils.createDocument(); doc.appendChild(doc.importNode(el, true)); return doc; }
public static Document transform(Templates xsltTemplate, Document in) { try { DOMSource beforeSource = new DOMSource(in); Document out = DOMUtils.createDocument(); Transformer trans = xsltTemplate.newTransformer(); trans.transform(beforeSource, new DOMResult(out)); return out; } catch (TransformerException e) { throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage()); } } }
public static Document transform(Templates xsltTemplate, Document in) { try { DOMSource beforeSource = new DOMSource(in); Document out = DOMUtils.createDocument(); Transformer trans = xsltTemplate.newTransformer(); trans.transform(beforeSource, new DOMResult(out)); return out; } catch (TransformerException e) { throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage()); } } }
@Override public ResourceValidator transform(Representation newRepresentation, Representation oldRepresentation) { Document doc = DOMUtils.createDocument(); Node representation = (Node) newRepresentation.getAny(); Node importedNode = doc.importNode(representation, true); doc.appendChild(importedNode); Document result = XSLTUtils.transform(templates, doc); newRepresentation.setAny(result.getDocumentElement()); return validator; }
@Override public ResourceValidator transform(Representation newRepresentation, Representation oldRepresentation) { Document doc = DOMUtils.createDocument(); Node representation = (Node) newRepresentation.getAny(); Node importedNode = doc.importNode(representation, true); doc.appendChild(importedNode); Document result = XSLTUtils.transform(templates, doc); newRepresentation.setAny(result.getDocumentElement()); return validator; }
public static Document read(XMLStreamReader reader, boolean recordLoc) throws XMLStreamException { Document doc = DOMUtils.createDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(new String(reader.getLocation().getSystemId())); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, doc, reader, true, recordLoc); return doc; }
public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing) throws XMLStreamException { Document doc = builder == null ? DOMUtils.createDocument() : builder.newDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(reader.getLocation().getSystemId()); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, reader, repairing); return doc; }
public static Document read(XMLStreamReader reader, boolean recordLoc) throws XMLStreamException { Document doc = DOMUtils.createDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(new String(reader.getLocation().getSystemId())); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, doc, reader, true, recordLoc); return doc; }
public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing) throws XMLStreamException { Document doc = builder == null ? DOMUtils.createDocument() : builder.newDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(reader.getLocation().getSystemId()); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, reader, repairing); return doc; }
public static Document read(XMLStreamReader reader, boolean recordLoc) throws XMLStreamException { Document doc = DOMUtils.createDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(new String(reader.getLocation().getSystemId())); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, doc, reader, true, recordLoc); return doc; }
public static Document read(XMLStreamReader reader, boolean recordLoc) throws XMLStreamException { Document doc = DOMUtils.createDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(reader.getLocation().getSystemId()); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, doc, reader, true, recordLoc); return doc; }
public static Document read(XMLStreamReader reader, boolean recordLoc) throws XMLStreamException { Document doc = DOMUtils.createDocument(); if (reader.getLocation().getSystemId() != null) { try { doc.setDocumentURI(reader.getLocation().getSystemId()); } catch (Exception e) { //ignore - probably not DOM level 3 } } readDocElements(doc, doc, reader, true, recordLoc); return doc; }
public static Element convertDomImplementation(Element node) throws XMLStreamException { if (DOMUtils.createDocument().getImplementation() != node.getOwnerDocument().getImplementation()) { W3CDOMStreamWriter xmlStreamWriter = new W3CDOMStreamWriter(); StaxUtils.copy(node, xmlStreamWriter); node = xmlStreamWriter.getDocument().getDocumentElement(); } return node; }