You could (in theory) use the SAXReader.addHandler() mechanism,
however ... I think it would be better to write your own SAX
ContentHandler instead:
try {
XMLReader parser = XMLReaderFactory.createXMLReader(
"org.apache.xerces.parsers.SAXParser");
par
Title: Need help using SAX
Hi all,
I'm very new to all this DOM and SAX and XML stuff, so I apologize if this is a dumb question.
Here is what I need to do: I am creating a Document with SAX, just like it says:
SAXReader reader = new SAXReader();
Document document = reader.read(url);
You could use getStringValue() instead.
String value = element.getStringValue();
Or you could use the valueOf() method:
String value = root.valueOf( "/trees/p");
Regards,
Edwin
---
SF email is sponsored by - The IT Product Guide
Read honest &
Hi,
I have an xml file which structures that are not predicted.
For example:
1 file can be:
testing
another file can be:
testing123i am herehello
i can't predict when there would be inside the tags as well as the position of tags in the tags.
if i use gettex
OutputFormat uses UTF-8 as the default encoding, so it really should work.
You don't really need to define it explicitly as:
outFormat.setEncoding("UTF-8");
You use OutputStream and not a Writer, so the encoding will be really used
defined by the format.
The Java source is something like iso8859-
Hi,
I'm trying to use XMLWriter in order to well format an XML String that
I've just build from information in DataBase.
An ex :
Element root = doc.addElement("ficheTechnique");
Element elemVehicule = root.addElement("vehicule");
elementCar = elementMoteur.addElement("car");
elementC
Hi all,
i really appreciate if someone can help me with this problem. I have
been trying unsucessfully to read the Element's Type from an xml
instance, i tried reading the docs and mail-list but doesnt seems to
help. Essentially, i am trying to read the type of an element (e.g
Integer, Date, S
Hi Michael
From: "Michael McKibben" <[EMAIL PROTECTED]>
> Hello, I've been experimenting with the org.dom4j.rule.* package and was
> wondering if there were plans to add support for named template rules and
> adding a callTemplate(String name) method to the Stylesheet class?
>
> Currently I exten
Hello, I've been experimenting with the org.dom4j.rule.* package and was
wondering if there were plans to add support for named template rules and
adding a callTemplate(String name) method to the Stylesheet class?
Currently I extend Rule and Stylesheet to add this behavior, but if others
could se