Questions tagged [xerces2-j]
31 questions
31
votes
5 answers
How to disable accessExternalDTD and entityExpansionLimit warnings with logback
I'm using logback with groovy and get lots of warnings showing up when parsing xml. I am aware of the bug in JDK1.7_u45 that is causing this.
Warning: org.apache.xerces.parsers.SAXParser: Property…

msoori
- 351
- 1
- 4
- 6
8
votes
2 answers
Xerces2 XML parser and Xalan XSLT processor -- state and replacement?
It is year 2018. What is the state of the Xerces2 XML parser and Xalan XSLT processor libraries for Java? Their last releases appear to be 2.11.0 in 2013 and 2.7.2 in 2014 respectively.
Are they still maintained?
Are they so perfect that they do…

wilx
- 17,697
- 6
- 59
- 114
6
votes
0 answers
use endorsed standard override mechanism for xerces in GlassFish 4.0
How do I use the endorsed standard mechanism to use xerces in a GlassFish 4.0 WAR application? According to the documentation*, you should put it into domain-dir/lib/endorsed. However, when I put xercesImpl, xml-apis as well as xml-resolver there,…

Yogu
- 9,165
- 5
- 37
- 58
5
votes
1 answer
Using Xerces-j to validate an XML Document
I'm trying to validate an XML document using Xerces-J.
I want the validator to pick up and resolve any associated XSD or DTD files (using schemalocation, nonamespaceschemalocationa and DOCTYPE references). It seems the loading of these resources…

Sprotty
- 5,676
- 3
- 33
- 52
4
votes
1 answer
Preventing XXE (External XML Entity) Injection with Xerces 2
I am trying to implement a XML validation which should prevent XXE Injection. The code as shown on the OWASP-Page works perfectly with a native JDK8.
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
…

maggn
- 41
- 5
4
votes
3 answers
Locale specific messages in Xerces 2.11.0 (Java)
I want to use locale specific error messages with my JAXP and Xerces2. By default only English messages are available.
First step is to retrieve the messages files and put them into the package "org/apache/xerces/impl/msg/" - done. By using…

Philip Helger
- 1,814
- 18
- 28
3
votes
2 answers
Dynamically generating XML Schema
I am trying to dynamically generate XML schema using Xerces-J and getting the following error, appreciate any help regarding it.
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
dbfac.setNamespaceAware(true);
DocumentBuilder…

user1959200
- 91
- 2
- 4
3
votes
3 answers
Java library that supports XSD 1.1
Is there a java library that supports XSD 1.1. I have tried finding it for 2 days. The only implementation I found was Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) which works along with JAXP 1.4. This beta version did not work well either. Basic…

Adithya Puram
- 303
- 2
- 6
- 23
2
votes
1 answer
Xerces v2.12.0 XML Schema 1.1 Validation
Xerces 2.12.0 claims to support XSD 1.1 (https://xerces.apache.org/xerces2-j/faq-xs.html), but I can't get past the SchemaFactory.newInstance call.
More context:
This line fails:
import javax.xml.validation.SchemaFactory;
//...
schemaFactory =…

Terry Lacy
- 75
- 7
2
votes
0 answers
The entity "entityname" was referenced, but not declared
I found one question in regarding to that but it appears that it is an old question and answers no longer work Java XML processing entity problem?
So my problem is I am actually using an XML file and it does have Entity References. I would like…

Sarp Kaya
- 3,686
- 21
- 64
- 103
1
vote
2 answers
XML Validation against XSD 1.1 gives error with XERCES library
I need to validate XML files against XSD 1.1 schema.
My question is:
Does the Xerces library supports now XSD 1.1?
xerces
xercesImpl
…

NAVOZ
- 45
- 7
1
vote
0 answers
Implementing custom XSD facet with Xerces?
Does Xerces parser support the implementation of custom facets?
I am looking at Xerces documentation to try add a custom facet for XSD validation, but I don't find anything specific, and I'm unsure where to start.
Edit:
One possibility might be to…

yas
- 3,520
- 4
- 25
- 38
1
vote
0 answers
How to configure Xerces2-J to ingore xsi:schemaLocation hints?
I am using Xerces2-J and have built a grammar pool as described in the Grammars FAQ
When parsing the document instance, I would like the parser to ignore any xsi:schemaLocation or xsi:noNamespaceSchemaLocation hints.
The FAQ says
registering a…

yas
- 3,520
- 4
- 25
- 38
1
vote
1 answer
How to Validate a xml file with catalogs using Xerces2-j
I'm trying to validate an xml file using oasis catalog. What i need is to give the path of the xml file and the path of the catalog that contains the xsd as input and to get the validation (true or error message) as output.
What i have done so far…

Morgan Wolf
- 19
- 1
- 3
1
vote
1 answer
Jena failing while asking for missing Xerces's class while Xerces 2 is included
I am getting the error
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/util/XMLChar
at org.apache.jena.shared.impl.PrefixMappingImpl.checkLegal(PrefixMappingImpl.java:172)
when running a simple Jena example, but I…

user118967
- 4,895
- 5
- 33
- 54