SAX « XML « Spring Q&A

1. How to create a handler for parsing a xml using SAX?

I'm using xerces SAX to parse this XML:

<product id="123">
  <weight unit="kg">150</weight/>
So I created my own class named
public class ProductSAXHandler extends DefaultHandler {

Now from ...

2. Why is my SAX handler returning an object with no values? I am setting it just fine

I'm writing a SAX parser for an xml, and the object it returns doesn't have the values that I am setting in the events. My classes structure is like this:

public class ProductSAXHandler ...

3. Getting Castor to use SAX

Getting Castor to use SAX We have been struggling getting Castor to work as our marshalling framework, only to run across this in the org.springframework.oxm.castor.AbstractMarshallerT estCase class this morning: Code: public ...

4. sax parser unable to read spring xsd

sax parser unable to read spring xsd Running on JBOSS-4.0.5GA with xfire-2.1.6 soap stack. Changing to spring 2.5 declarative transaction and have an application context doc (transaction.xml) with the following beans ...

5. Couldn't get a SAX parser while constructing a envelope

Couldn't get a SAX parser while constructing a envelope Hi, We are using a Spring WebServiceTemplate class in out application to access a WebService that is developed using Spring 1.5. The ...

6. Writing StAX events to SAX ContentHandler

Writing StAX events to SAX ContentHandler Hi There is a handy class javax.xml.transform.sax.SAXTransformerFactory which allows creating Transformers which operate on incoming SAX events. I was wondering whether it is possible to ...