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
10
votes
4 answers

XML validation against XSD 1.1 with Xerces in Java

I have installed Xerces through Maven: junit junit 4.11 test
Vogon Jeltz
  • 275
  • 2
  • 3
  • 8
10
votes
1 answer

The import org.apache.xml.serialize.XMLSerializer cannot be resolved

When I try to import org.apache.xml.serialize.XMLSerializer, I got the below error msg: The import org.apache.xml.serialize.XMLSerializer cannot be resolved Can anyone tell me the cause? Thanks!!
zoe
  • 905
  • 5
  • 12
  • 18
9
votes
2 answers

Serialize DOM to FileOutputStream using Xerces

I am using this link to generate XML file using DOM. It says that "Xerces parser is bundled with the JDK 1.5 distribution.So you need not download the parser separately." However, when I write the following line in my Eclipse Helios it gives…
whitehat
  • 2,381
  • 8
  • 34
  • 47
9
votes
3 answers

Disable logging in Java Xerces ("[Fatal Error] :1:1: Content is not allowed in prolog.")

My application expects that it will sometimes try to parse invalid XML documents. I currently catch the "SAXParseException: Content is not allowed in prolog." exception, which works fine. However, Xerces still feels the need to print it's own…
tlrobinson
  • 2,812
  • 1
  • 33
  • 35
8
votes
2 answers

How do I turn off validation when parsing well-formed XML using DocumentBuilder.parse?

I'm using Java 6. I want to parse XHTML that I know is well-formed. As such, I don't want to do any validation against DTD's or other schemas referenced in the doc. However, I'm having trouble figuring out how to turn that validation off. I…
Dave
  • 15,639
  • 133
  • 442
  • 830
8
votes
1 answer

XSLT: Sort by multiple items

I have XML data such as: 4 2011-01-18T16:55:54Z title2 3 2011-01-18T16:55:54Z title1
smokedice
  • 900
  • 2
  • 10
  • 25
8
votes
1 answer

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

I am using java1.6,jboss5.1 and Spring maven 3.2.5 in my project.I am getting java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory This is my Pom.xml
Varun
  • 4,342
  • 19
  • 84
  • 119
8
votes
3 answers

Sonar Xerces conflict Findbugs and ivy:report

I am trying to get sonar to work for a project with a quality profile that includes Findbugs rules. However when analyzing the project the sonar anttask chrashes with the following error: Caused by: java.io.IOException: SAX2 driver class…
pvgoddijn
  • 12,638
  • 15
  • 47
  • 56
8
votes
2 answers

Why does Maven choose version 1.0.b2 over 1.3.03

I have a project with a dependency on HTTP BUilder, this gives me the followoing dependency tree: [INFO] +- org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.1:compile [INFO] | +-…
Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211
8
votes
2 answers

WAS 8.5: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers.SAXParserFactory

I am deploying a J2EE web application in Websphere Application Server 8.5. The web application has a shared library with all the third party libraries. All the internally coded libraries are inside the WEB-INF/lib folder. The problem is that in…
David García González
  • 5,164
  • 8
  • 29
  • 35
8
votes
4 answers

Workaround for XMLSchema not supporting maxOccurs larger than 5000

My problem is with parsing an XSD Schema that has elements with maxOccurs larger than 5000 (but not unbounded). This is actually a know issue in either Xerces (which I'm using, version 2.9.1) or JAXP, as described here:…
mzywiol
  • 386
  • 1
  • 3
  • 11
8
votes
1 answer

using keyref in xml schema for an attribute with a list of values

I am trying to design a schema for validating an xml format that is already used in an application (not much room for redesigning the xml). I am trying to utilize the key and keyref elements of the xml schema dictionary to validate identity…
artur
  • 1,710
  • 1
  • 13
  • 28
8
votes
6 answers

org.apache.xerces.jaxp.SAXParserFactoryImpl not found when importing Gears API in GWT

I've created a GWT project using Eclipse which was working perfectly (I was able to run it in both Hosted Mode and on Google App Engine) until I tried to import the Gears API for Google Web Toolkit. After adding the following line to my java source…
Templar
  • 5,067
  • 7
  • 34
  • 39
7
votes
1 answer

Resolving a "duplicate definition of library class" in ProGuard

I have a Java project which includes the Xerces library. When I process the project with Proguard, I get the warning: Note: duplicate definition of library class [org.w3c.dom.html.HTMLDOMImplementation] I see in Xerces that this class exists, and…
seinecle
  • 10,118
  • 14
  • 61
  • 120
7
votes
3 answers

Why is Apache Xerces/Xalan adding additional carriage returns to my serialized output?

I'm using Apache Xerces 2.11.0 and Apache Xalan 2.7.1 and I'm having problems with additional carriage return characters in the serialized XML. I have this (pseudo) code: String myString = ...; Document doc = ...; Element item =…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
1
2
3
42 43