Re: [dom4j-user] Need help using SAX

2005-08-15 Thread Edwin Dankert
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

[dom4j-user] Need help using SAX

2005-07-20 Thread Kerzhner, Olia
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);

Re: [dom4j-user] need help

2005-03-11 Thread Edwin Dankert
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 &

[dom4j-user] need help

2005-03-11 Thread Jac
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

Re: [dom4j-user] Need Help for Encoding.

2004-10-22 Thread Barnabas Davoti
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-

[dom4j-user] Need Help for Encoding.

2004-10-21 Thread Stéphane Toussaint
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

[dom4j-user] need help on using XML Schema

2003-01-07 Thread Chung-Onn Cheong
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

Re: [dom4j-user] Need help on using Stylesheets, Rules and Actions...

2002-06-14 Thread James Strachan
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

[dom4j-user] Need help on using Stylesheets, Rules and Actions...

2002-06-13 Thread Michael McKibben
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