xerces

XercesDOMParser and XIncludes

I am attempting to get xincludes working in an existing system that uses a XercesDOMParser in xercesc to parse incoming xml from a client. I am working with Apache Xercesc v3.0.1, and the incoming XML, read from an input stream, is: <?xml version="1.0" encoding="UTF-8"?> <VisionServer xmlns:xi="http://www.w3.org/2001/XInclude"&gt; ...

How do I use Xerces w/ in a Windows environment?

I have downloaded the source for Xerces and am trying to use it in a Greenhills project. I get the following error: could not open source file "xercesc/util/Xerces_autoconf_config.hpp" The code where the error hit is commented as: // If the next line generates an error then you haven't run ./configure #include <xercesc/util/Xerces_...

Xerces + Python?

Does anyone know if there's an available python library compatible with Python2.6 that exposes the Xerces functionality and its XML DOM capabilities? I would define the desired capabilities as: XML DOM select by Xpath & XSLT processor. ...

Spring App + Tomcat + XSLT = TransformerFactoryConfigurationError

Hi, I am trying to deploy a Spring 3.0 Webapplicatoin to a tomcat5.5 server running on CentOS. Deployment works, but when I try to access the application I get a TransformerFactoryConfigurationError: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.An...

Has anyone gotten Xalan to build (against Xerces) with VisualStudio .NET?

I have spent hours trying to get the subversion trunk or 1.10 building with both VS.NET 2008 and 2010, to no avail. I'm currently stuck with many link errors. I've read dozens of threads on this and am quite surprised that two major libraries from Apache would essentially be so fraught with problems when it comes to building. I am using ...

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 that conform to the same DTD that are generated by multiple different systems (none of whi...

JAVA: How to use the xerces SAXParser using multiple schemas with identical targetNamespaces

Hi all, I have a requirement to perform some validation on an incoming piece of XML using a group of schemas. All these schemas share the same targetNamespace but are separated into different .xsd files. My java program is loading each xsd file into an InputSource[] array and passing them into the SAX Parser (SCHEMA_SOURCE property). ...

Validating document in Xerces C++

I want to load an XML document in Xerces-C++ (version 2.8, under Linux), and validate it using a DTD schema not referenced from the document. I tried the following: XercesDOMParser parser; parser.loadGrammar("grammar.dtd", Grammar::DTDGrammarType); parser.setValidationScheme(XercesDOMParser::Val_Always); parser.parse("xmlfile.xml"); B...

Java: How to parse XML comments using org.apache.xerces.parsers.SAXParser?

I managed to parse to comments from an XML file using javax.xml.parsers.SAXParser, but is there a way to parse comments in org.apache.xerces.parsers.SAXParser in Java? A simple example would be brilliant. thanks ...

What is the correct way to handle object which is instance of class in apache.xerces?

Preface: I'm working on docx parser for java. docx format is based on xml. When I read document its parts are being unmarshalled (with JAXB). And I get a tree of certain elements based on xml markup. Almost problem: But some elements (which are at very deep xml level) returned not as certain class from docx spec (i.e. CTStyle, CTDrawin...

Xerces C++ SAX Parsing Problem: expected class-name before '{' token

I'm trying to run through an example given for the C++ Xerces XML library implementation. I've copied the code exactly, but I'm having trouble compiling it. error: expected class-name before '{' token I've looked around for a solution, and I know that this error can be caused by circular includes or not defining a class before it is ...

JSP compilation error upon changing XML parser to Xerces

All, I'm working on a java webapp that we deploy in the Resin web app server. I have been doing some XML parsing for a new part of the application, and realized that our app was using Resin classes to do the parsing. I wanted to get away from that and use something more standard for a number of reasons, so I set these system properti...

Caching XSD schema to reuse in several XML DOM parser tasks in Xerces

How can I cache an XSD schema (residing on disk) to be reused when parsing XMLs in Xerces (C++)? I would like to load the XSD schema when starting the process, then, whenever I need to parse an XML, to validate it first using this loaded schema. ...

How to get the Doctype Declaration in Xerces-C when using SAX2 ?

I am using SAX2 from Xerces-C to read an XML document. However, I would like to check the Doctype declaration (if there is any) to make sure that the XML file is in the format I am expecting. I have tried the unparsedEntityDecl and notationDecl methods from the DTDHandler, and EntityResolver seems to be more low-level than what I am loo...

How can I parse XML doc with Schema 1.1, in Eclipse IDE?

How can I validate XML documents with Schema 1.1 in "Eclipse IDE" OR How can I validate an XML docs in "Eclipse IDE" by using external Apache xerces parser? (this will resolve my issue as xerces supports Schema 1.1) ...

Spring Roo unable to generate Selenium tests because of Xerces error

After watching Roo Google IO, I decided to try it out using this tutorial, but I'm getting stuck when trying to create Selenium tests. ~.web roo> selenium test --controller ~.web.PizzaOrderController Created SRC_MAIN_WEBAPP/selenium Created SRC_MAIN_WEBAPP/selenium/test-pizzaorder.xhtml Created SRC_MAIN_WEBAPP/selenium/test-suite.xhtml...

writing XML with Xerces 3.0.1 and C++ on windows

Hi, i have the following function i wrote to create an XML file using Xerces 3.0.1, if i call this function with a filePath of "foo.xml" or "../foo.xml" it works great, but if i pass in "c:/foo.xml" then i get an exception on this line XMLFormatTarget *formatTarget = new LocalFileFormatTarget(targetPath); can someone explain why my co...

xerces serialization in Java 6

In Java 6, the entire xerces XML parser/serializer implementation is now in the Java runtime (rt.jar). The packages have been moved under the com.sun.* namespace, which places them off-limits for explicit reference within client code. This is not a problem when using the parser, which is instantiated via javax API-defined factories. ...

Serializing chinese characters with Xerces 2.6

I have a Xerces (2.6) DOMNode object encoded UTF-8. I use to read its TEXT element like this: CBuffer DomNodeExtended::getText( const DOMNode* node ) const { char* p = XMLString::transcode( node->getNodeValue( ) ); CBuffer xNodeText( p ); delete p; return xNodeText; } Where CBuffer is, well, just a buffer object which is latel...

How do I fix my "Stream closed" error in spring-ws?

I have working code using the spring-ws library to respond to soap requests. I moved this code to a different project (I'm merging projects) and now it is failing. I would like to figure out the reason for the failure. The symptom I get is this: when the HTTP request arrives, spring begins handling the call. Then I get the following exc...