Questions tagged [xerces]

Xerces is a collection of software libraries for parsing, validating, serializing and manipulating XML

Xerces is Apache's collection of software libraries for parsing, validating, serializing and manipulating XML.
The library implements a number of standard APIs for XML parsing, including DOM, SAX and SAX2.
The implementation is available in Java, C++ and Perl programming languages.

Useful references:

639 questions
812
votes
11 answers

Dealing with "Xerces hell" in Java/Maven?

In my office, the mere mention of the word Xerces is enough to incite murderous rage from developers. A cursory glance at the other Xerces questions on SO seem to indicate that almost all Maven users are "touched" by this problem at some point. …
Justin Garrick
  • 14,767
  • 7
  • 41
  • 66
37
votes
8 answers

Validate an XML File Against Multiple Schema Definitions

I'm trying to validate an XML file against a number of different schemas (apologies for the contrived example): a.xsd b.xsd c.xsd c.xsd in particular imports b.xsd and b.xsd imports a.xsd, using: I'm trying…
Jonathan Holloway
  • 62,090
  • 32
  • 125
  • 150
28
votes
4 answers

cmake cannot find libraries installed with vcpkg

I want to use vcpkg in a CMake project in Windows, because I need boost and xerces that are both handled by this package manager. I've the following CMakeLists.txt: cmake_minimum_required (VERSION 3.12.0) project (myproj) set (CMAKE_PREFIX_PATH…
Jepessen
  • 11,744
  • 14
  • 82
  • 149
27
votes
2 answers

Xerces error: org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl

I'm developing a web application using JSF 2.0, NetBeans 6.9.1, GlassFish Server 3.1, mojarra 2.0.3, and JasperReports 3.7.6. Included in my project library is the jar file "xerces-2.8.0.jar". This file was imported as part of the JasperReports jar…
Sean
  • 971
  • 4
  • 12
  • 21
26
votes
2 answers

Cure for 'The string "--" is not permitted within comments.' exception?

I'm using Java 6. I have this dependency in my pom ... xerces xercesImpl 2.10.0
Dave
  • 15,639
  • 133
  • 442
  • 830
16
votes
4 answers

SAXParseException; src-resolve: Cannot resolve the name '...' to a(n) 'type definition' component

I'm trying to do schema validation, currently using a javax.xml.validation.SchemaFactory. Unfortunately When I call the newSchema(Source schema) function, I get the following error: Caused by: org.xml.sax.SAXParseException; systemId:…
Mac
  • 1,143
  • 6
  • 21
  • 45
15
votes
7 answers

ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration

I am developing a GWT application in Eclipse and use jdom2 to read some custom xml property files. Following a recent update my application now fails with the above error when trying to read the xml file. The relevant stack trace…
ejoftheweb
  • 301
  • 1
  • 2
  • 10
12
votes
1 answer

NoClassDefFoundError: org/w3c/dom/ls/DocumentLS - issue occurring only on deployment after having fixed it on compile time

Background I have a project where I parse some XML documents and I happened to need the xerces dependency: xerces xerces 2.4.0 While writing the…
Matteo NNZ
  • 11,930
  • 12
  • 52
  • 89
12
votes
3 answers

XPath support in Xerces-C

I am supporting a legacy C++ application which uses Xerces-C for XML parsing. I've been spoiled by .Net and am used to using XPath to select nodes from a DOM tree. Is there any way to get access some limited XPath functionality in Xerces-C? I'm…
Adam Tegen
  • 25,378
  • 33
  • 125
  • 153
11
votes
2 answers

Can't call getElementsByTagName on a node in Xerces or Neko?

hi all I'm trying to parse a DOM tree using Neko/Xerces in Java. NodeList divs = this.doc.getElementsByTagName("DIV"); for(int i=0; i < divs.getLength(); i++) { NodeList images = divs.item(i).parentNode().getElementsByTagName("IMG"); //…
James
  • 15,085
  • 25
  • 83
  • 120
11
votes
4 answers

XercesImpl in conflict with JavaSE 6's internal xerces implementation. Both are needed... what can be done?

I am sure that I am not the first to encounter this conflict. The code that I have inherited does the following: org.w3c.dom.Document dom; // declaration javax.xml.validation.Schema schema; // declaration ... ... ... javax.xml.validation.Validator…
Yaneeve
  • 4,751
  • 10
  • 49
  • 87
11
votes
2 answers

Does setting FEATURE_SECURE_PROCESSING in transformerFactory update other security features as well?

In jdk1.6, while I am setting transformerFactory.setFeature(XMLConstants.ACCESS_EXTERNAL_DTD, false) I am facing the following error: javax.xml.transform.TransformerConfigurationException: Cannot set the feature…
Karthick M Mayan
  • 121
  • 1
  • 1
  • 8
11
votes
1 answer

How can I force a SAX parser to use a DTD if one is not specified in the input file?

How can I force a SAX parser (specifically, Xerces in Java) to use a DTD when parsing a document without having any doctype in the input document? Is this even possible? Here are some more details of my scenario: We have a bunch of XML documents…
Kaypro II
  • 3,210
  • 8
  • 30
  • 41
11
votes
2 answers

Apache Hadoop setXIncludeAware UnsupportedOperationException

I'm trying to get Apache Hadoop 1.21 running, but I'm getting this exception: Failed to set setXIncludeAware(true) for parser…
Klinki
  • 1,399
  • 3
  • 15
  • 33
10
votes
4 answers

Java and Xerces: can't find property XMLConstants.ACCESS_EXTERNAL_DTD

I looked for similar posts on this blog, but couldn't find an answer to my question, so I decided to ask for help. I wrote this simple function in Java: public void open(InputStream stream) throws FoliumFatalException { try { …
Bia
  • 165
  • 1
  • 3
  • 12
1
2 3
42 43