baseID = dsource.getSystemId();
baseID = dsource.getSystemId();
baseId = domsrc.getSystemId(); final org.w3c.dom.Node node = domsrc.getNode(); final DOM2SAX dom2sax = new DOM2SAX(node);
m_systemID = dsource.getSystemId();
m_systemID = dsource.getSystemId();
input = new InputSource(domsrc.getSystemId());
m_systemID = dsource.getSystemId();
public static DOMWrappingReader createFrom(ReaderConfig cfg, DOMSource src) throws XMLStreamException { Node rootNode = src.getNode(); String systemId = src.getSystemId(); return new DOMWrappingReader(cfg, rootNode, systemId); }
public static DOMWrappingReader createFrom(ReaderConfig cfg, DOMSource src) throws XMLStreamException { Node rootNode = src.getNode(); String systemId = src.getSystemId(); return new DOMWrappingReader(cfg, rootNode, systemId); }
public static DOMWrappingReader createFrom(ReaderConfig cfg, DOMSource src) throws XMLStreamException { Node rootNode = src.getNode(); String systemId = src.getSystemId(); return new DOMWrappingReader(cfg, rootNode, systemId); }
/** * Converts a DOMSource object to a StreamSource representing an XML data * source. The system ID is preserved, allowing relative URIs to be * processed. * * @param domSource A DOMSource instance. * * @return A StreamSource object for reading the content represented by the * original DOM tree. */ public static StreamSource toStreamSource(DOMSource domSource) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); StreamResult result = new StreamResult(baos); try { // use identity transformer Transformer idt = TransformerFactory.newInstance().newTransformer(); idt.transform(domSource, result); } catch (TransformerException tex) { LOGR.log(Level.WARNING, "Error serializing DOMSource " + domSource.getSystemId(), tex); } StreamSource streamSrc = new StreamSource(new ByteArrayInputStream( baos.toByteArray()), domSource.getSystemId()); return streamSrc; }
_systemId = src.getSystemId();
@Override public DOMSource process(DOMSource aDocument) throws XMLException { DOMResult result = new DOMResult(); try { transform(aDocument, result); } catch (IOException e) { throw new XMLException(e.getMessage(), e); } catch (TransformerException e) { throw new XMLException(e.getMessage(), e); } Document docraw = (Document)result.getNode(); DOMSource resultSource = new DOMSource(docraw); resultSource.setSystemId(aDocument.getSystemId() + "/transformed(" + systemId + ")"); return resultSource; }
/** * Obtains the (XML) response entity as a DOM Document and resets the entity * input stream for subsequent reads. * * @param response A representation of an HTTP response message. * @param targetURI The target URI from which the entity was retrieved (may * be null). * @return A Document representing the entity; its base URI is set using the * given targetURI value (this may be used to resolve any relative URIs * found in the document). */ public static Document getResponseEntityAsDocument(ClientResponse response, String targetURI) { DOMSource domSource = (DOMSource) getResponseEntityAsSource(response, targetURI); Document entityDoc = (Document) domSource.getNode(); entityDoc.setDocumentURI(domSource.getSystemId()); return entityDoc; } }
/** * Prints an XML document. * * @param aOs * Output stream to print on. * @param aPrettyPrint * Pretty print or not. */ public void print(OutputStream aOs, boolean aPrettyPrint) { try { write(new XSLTransformation().setPrettyPrint(aPrettyPrint), aOs); } catch (XMLException e) { throw new RuntimeException( "Programming error, cannot print a DOM tree?: " + doc.getSystemId(), e); } }
public void initialize(Service service) { if (LOG.isLoggable(Level.FINER)) { LOG.log(Level.FINER, "Initialize JiBX Databinding for [" + service.getName() + "] service"); } for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } Collection<DOMSource> schemas = getSchemas(); if (schemas != null) { for (DOMSource source : schemas) { addSchemaDocument(serviceInfo, schemaCollection, (Document)source.getNode(), source .getSystemId()); } } JibxSchemaInitializer schemaInit = new JibxSchemaInitializer(serviceInfo, schemaCollection, this); schemaInit.walk(); } }
DOMSource domSource = (DOMSource) sourceXSD; if(null == domSource.getNode()) { resolvedSchemaSource = resolveSchema(domSource.getSystemId());
public static void sendDOMSource(DOMSource source, Receiver receiver) throws XPathException { Node startNode = source.getNode(); if (startNode == null) { // Send an empty document receiver.open(); receiver.startDocument(0); receiver.endDocument(); receiver.close(); } else { DOMSender driver = new DOMSender(startNode, receiver); driver.setSystemId(source.getSystemId()); receiver.open(); driver.send(); receiver.close(); } }
DOMSource domSource = (DOMSource) sourceXSD; if(null == domSource.getNode()) { resolvedSchemaSource = resolveSchema(domSource.getSystemId());
public static void sendDOMSource(DOMSource source, Receiver receiver) throws XPathException { Node startNode = source.getNode(); if (startNode == null) { // Send an empty document receiver.open(); receiver.startDocument(0); receiver.endDocument(); receiver.close(); } else { DOMSender driver = new DOMSender(startNode, receiver); driver.setSystemId(source.getSystemId()); receiver.open(); driver.send(); receiver.close(); } }