xerces

Change the com.sun.org.apache.xml.internal.serialize.XMLSerializer & com.sun.org.apache.xml.internal.serialize.OutputFormat

♀尐吖头ヾ 提交于 2019-12-17 14:47:21
问题 Using com.sun.org.apache.xml.internal.serialize.XMLSerializer and com.sun.org.apache.xml.internal.serialize.OutputFormat causes some errors when compiling using java 1.6. The solution I found is by using org.apache.xml.serialize.XMLSerializer and org.apache.xml.serialize.OutputFormat after adding xerces. The problem is that theses classes are deprecated. What can I use without to replace them without touching the code ? Thnx This is the dependency I used : <dependency> <groupId>xerces<

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

。_饼干妹妹 提交于 2019-12-17 07:52:10
问题 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 file: import com.google.gwt.gears.client.geolocation.Geolocation; I get the following error when I try to compile: 19-Jun-2009 3:36:09 AM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: failed com.google.apphosting.utils.jetty

Netbeans doesn't recognize xercesimpl

一曲冷凌霜 提交于 2019-12-14 03:19:52
问题 I am trying to build a plugin for netbeans using maven and for some reason Netbeans doesn't recognize xercesimpl.jar packaged with the plugin. Here is the stacktrace I see. java.io.IOException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:353) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:276) at org.apache.batik.dom.svg.SAXSVGDocumentFactory

XSD Validation Error : cos-all-limited.1.2: An 'all' model group must appear in a particle with

邮差的信 提交于 2019-12-12 14:18:50
问题 I have and XSD which gives the following error during the schema generation. org.xml.sax.SAXParseException; systemId: file:/D:/Basil/Projects/myproducts.xsd; lineNumber: 577; columnNumber: 50; cos-all-limited.1.2: An 'all' model group must appear in a particle with '{'min occurs'}' = '{'max occurs'}' = 1, and that particle must be part of a pair which constitutes the '{'content type'}' of a complex type definition. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper

Can't build app when I import Xerces library (exit value 1)

你离开我真会死。 提交于 2019-12-12 08:48:52
问题 I cannot seem to get my app to build when I import in the Xerces library. I am already using the multidex due to previous issues and therefore I know this is all setup properly. I have spend a couple of days now looking online and trying all sorts of versions of Xerces and tweaks to my build.gradle but cannot work out the issue. I have tried cleaning re-building, re-setting Android Studio/my PC, using a jar directly compiling and now officially out of ideas. Below is my build.gradle setup:

NodeList.getLength() returning 0 in Java 11

自古美人都是妖i 提交于 2019-12-12 06:39:36
问题 I am migrating my application from Java 8 to Java 11. In Java 8, my input xml file was parsing correctly, but in Java 11 the nodeList.getLength() is returning 0 . Please refer the code as per which I am always getting the error: Cannot find signature . I have tried using document.getElementsByTagName("Signature") instead of getElementsByTagNameNS() , which returns correct length . However the unmarshalXMLSignature() method then gives an error that Document implementation must support DOM

Android XML validation using XSD ( both xerces and SchemaFactory) error

此生再无相见时 提交于 2019-12-12 06:13:32
问题 Now, I'm having some pb with XML validation using XSD. Since I use SchemaFactory: SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); It give me: Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lorg/apache/xerces/impl/xs/SchemaGrammar; Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lorg/apache/xerces/impl/xs/XSConstraints; java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema Then

How to use Xerces while generating sources from XSD 1.1 with maven

烂漫一生 提交于 2019-12-12 05:28:22
问题 I have a XSD file with assertion tags. I have read that Xerces supports a XML Schema 1.1 draft with these tags. How can I use an actual Xerces version, instead of the standard Java implementation, in my maven build. 回答1: An old way to use the Xerces version was adding those parameters. I do not know if it could still work. -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp

Not sure if SAXParser is thread safe

。_饼干妹妹 提交于 2019-12-12 04:48:21
问题 For the last few months I have been wrestling with the SAXParser to figure out where a strange bug is originating from. Where I work, I receive a lot of fairly large XML files to load into our database. We have some code which has been doing this using the SAXParser and our own DefaultHandler implementation and this works fine. However, I now have a BlockingQueue which runs multiple processes which includes the SAXParser I've wrote about above. When I do this I start to see the wrong XML

Xerces setTextContent method strips new lines / carriage returns. How to prevent?

烈酒焚心 提交于 2019-12-12 00:33:38
问题 I'm using Xerces (Java) to generate XML documents. I have a large block of text (including carriage returns and new lines) that I would like to replicate exactly in my XML document as the text content of an element. For example: <element>This is some text here is some more that's all folks</element> However, whenever I try use: element.setTextContent(myBlockOfText) All the new lines are replaced with single space characters. How can I keep the new lines within this block of text using Xerces?