xerces

How to know if a DOMDocument is owned by a parser

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 06:23:04
问题 I am looking into an issue where an API is getting called from two different sources. We have an API called dispatch. Its signature is as follows. DOMDocument* dispatch( DOMDocument * requestDocument ) We observed that this API can be called by passing a DOMDocument object that is A stand-alone DOMDocument object created using DOMImplementation::createDocument http://xerces.apache.org/xerces-c/apiDocs-3/classDOMImplementation.html A parse owned DOMDocument object created using

How to know if a DOMDocument is owned by a parser

余生长醉 提交于 2019-12-25 06:22:20
问题 I am looking into an issue where an API is getting called from two different sources. We have an API called dispatch. Its signature is as follows. DOMDocument* dispatch( DOMDocument * requestDocument ) We observed that this API can be called by passing a DOMDocument object that is A stand-alone DOMDocument object created using DOMImplementation::createDocument http://xerces.apache.org/xerces-c/apiDocs-3/classDOMImplementation.html A parse owned DOMDocument object created using

ClassNotFound: Xerces SAXParserFactoryImpl when running in Wildfly 8.2

左心房为你撑大大i 提交于 2019-12-25 05:00:31
问题 I am running Wildfly 8.2.0 and doing some XML Config file parsing. The idea is that I'll be able to use my bundled xercesImpl.jar to provide the JAXP SAXParserFactoryImpl. When running the logic outside of Wildfly, I am successfully able to parse with the SAXParserFactoryImpl. This factory is found by setting the system property: System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl"); SAXParserFactory factory = javax.xml.parsers

Error with XSD validation: “cvc-elt.1: Cannot find the declaration of element 'xs:schema'”

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 12:33:38
问题 I am trying to use the Maven XML plugin to validate my xml against a schema but I keep having an error saying: cvc-elt.1: Cannot find the declaration of element 'xs:schema'. I guess it has to deal with my namespaces declaration, so here they are: In my XSD: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.myurl.com/schemas" targetNamespace="http://www.myurl.com/schemas" elementFormDefault="qualified" version="1.0"> In my XML: <myTag xmlns="http://www.myurl.com/schemas"

Maven dependency updates report takes hours to complete

拟墨画扇 提交于 2019-12-24 08:06:25
问题 I have task to run Jenkins job witch would report newer version of libraries. I think that these would do what I need: org.codehaus.mojo:versions-maven-plugin:2.5:plugin-updates-report org.codehaus.mojo:versions-maven-plugin:2.5:property-updates-report org.codehaus.mojo:versions-maven-plugin:2.5:dependency-updates-report Job runs correctly but when it reaches project last artifact (artifact xerces:xercesImpl: checking for updates from default) it stucks for few hours. I was able to reproduce

Xerces XMLString::transcode null/empty reply

心不动则不痛 提交于 2019-12-24 05:04:21
问题 Xerces transcode is returning an empty string. I think it is related to locale issues, but i'm stuck. I have this simple program: #include <xercesc/util/PlatformUtils.hpp> #include <xercesc/util/XMLString.hpp> #include <xercesc/dom/DOM.hpp> #include <xercesc/util/XMLString.hpp> #include <xercesc/framework/MemBufInputSource.hpp> #include <xercesc/dom/DOMException.hpp> #include <string> #include <stdio.h> XERCES_CPP_NAMESPACE_USE using namespace std; int main(int argc, char* argv[]) { string a

How to Programmatically Update and Add Elements to an XSD

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 03:27:27
问题 I need to programatically update an an existing XSD in java that looks like this: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="com/company/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="com/company/common/" elementFormDefault="qualified"> <xs:include schemaLocation="DerivedAttributes.xsd" /> <xs:element name="MyXSD" type="MyXSD" /> <xs:complexType name="Containter1"> <xs:sequence> <xs:element name="element1" type="element1" minOccurs="0" maxOccurs="unbounded"

javax.xml.transform.TransformerException: java.io.FileNotFoundException: <file_name>(Access is denied)

社会主义新天地 提交于 2019-12-24 02:09:37
问题 I am getting exception at last line of code - Transformer transformer = TransformerFactory.newInstance().newTransformer(); DOMSource xmlSource = new DOMSource(document); StreamResult result; File f = new File(sFilePath); if (f.exists() == false) { result = new StreamResult(f); } else { result = new StreamResult(sFilePath); } transformer.transform(xmlSource, result); The exception stacktrace is - java.io.FileNotFoundException: C:\ProgramData.\config\.xml (Access is denied) stacktrace javax.xml

Groovy Grape dealing with dependency resolution

旧时模样 提交于 2019-12-23 20:09:13
问题 I am trying to use org.xhtmlrenderer:core-renderer:R8pre2 in a groovy script, but I get a Linkage error: Caught: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.xerces.dom.NodeImpl.getOwnerDocument()Lorg/w3c/dom/Document;" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Node

Xerces-C++ DOM node line/column number location

走远了吗. 提交于 2019-12-23 16:54:52
问题 I'm writing a custom XML validator using Xerces-C++. My current approach loads the document into a DOM, and then checks are performed on it. What I need is a way to access the line/column number of a node in the DOM. I've been reading the API docs and googling, but I'm coming up short. Is it possible to somehow retrieve this kind of information about the nodes? Implementing the XMLValidator interface looks like it would probably provide me with that kind of info, but it would require