Re: [dom4j-user] How to checkout dom4j? I got "No such file or directory" message

2006-05-14 Thread Maarten Coene
It seems that the CVS url has been changed recently:Could you try: cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/dom4j login   cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/dom4j co dom4jregards,Maarten- Original Message From: T Sean <[EMAIL PROTECTED]>To: dom4j-user@lists.sourceforge.netSent: S

Re: [dom4j-user] Xpath parameter of selectSingleNode method

2006-04-12 Thread Maarten Coene
Charly,it should work, are you sure that the variable 'nameConnection' has the value "postgresDWH" (without the quotes)?also, I've noticed that you don't have a closing ']' in the xpath _expression in your else-clause.regards,MaartenCharly CLAIRMONT <[EMAIL PROTECTED]> wrote: Hi !I'am a beginer

Re: [dom4j-user] document.getXMLEncoding() always return null

2005-12-23 Thread Maarten Coene
According to the getXMLEncoding() javadoc:   Return the encoding of this document, as part of the XML declaration This is null when unspecified or when it is not known (such as when the Document was created in memory) or when the implementation does not support this operation. If I take a look

RE: [dom4j-user] Error with 1.6.1 - not with 1.5.2

2005-10-04 Thread Maarten Coene
- daveDavid Thielenwww.windwardreports.com303-499-2544-Original Message-From: Maarten Coene [mailto:[EMAIL PROTECTED] Sent: Monday, October 03, 2005 1:11 PMTo: David ThielenCc: dom4j-user@lists.sourceforge.netSubject: Re: [dom4j-user] Error with 1.6.1 - not with 1.5.2David,this is an bug in jaxen. I think they h

Re: [dom4j-user] Error with 1.6.1 - not with 1.5.2

2005-10-03 Thread Maarten Coene
David, this is an bug in jaxen. I think they have already fixed it. Can you try with the latest jaxen release? http://jaxen.codehaus.org regards, Maarten David Thielen wrote: Hello; I have a node that is a DefaultElement with a lot of sub elements. I call: Node.selectNodes(“grunnbokstype='B

Re: [dom4j-user] xpath bug I think - need spaces on sides of "div"

2005-08-09 Thread Maarten Coene
David,   I've forwarded it to the jaxen mailinglist, since this looks like an jaxen issue.   regards, MaartenDavid Thielen <[EMAIL PROTECTED]> wrote: Hi;   This throws an exception: string-length(/F/FAT/SON)div10   This does not: string-length(/F/FAT/SON)div 10   But XmlSpy handles both cases.

[dom4j-user] [announcement] dom4j 1.6.1 released!

2005-05-20 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.6.1 release! Changes in this version include: Fixed bugs: o Fixed a problem with XMLWriter that was causing too many new lines to be written to the resulting XML. Thanks to Thomas Fromm. Changes: o Updated the XPP2 implementation to version 2.1.1

Re: [dom4j-user] dom4j 1.6 adds spaces to end of created xml file

2005-05-10 Thread Maarten Coene
David,   I couldn't duplicate your problem. Can you given an example?   thanks MaartenDavid Thielen <[EMAIL PROTECTED]> wrote: I switched to 1.6 and now XmlWriter is writing a bunch of spaces to the end of xml files I create.   Any ideas?   Thanks – dave  __

Re: [dom4j-user] change in xpath syntax

2005-05-10 Thread Maarten Coene
Steven,   I think the reason is that your XML file contains namespace declarations.   But to be sure: could you send us a sample of your XML file and some sample code illustrating your problem   regards, MaartenSteven Citron-Pousty <[EMAIL PROTECTED]> wrote: I am using dom4j 1.6 with jaxen 1-

RE: [dom4j-user] xml in BIG5 encoding - incorrect result

2005-05-09 Thread Maarten Coene
; wrote: Hello;   As I understand it, 2 byte sequences in Big5 are the unicode value of the character. If this is not the case, then it may be converting them correctly and I just am not understanding Big5 correctly.   Thanks - dave   From: Maarten Coene [mailto:[EMAIL PROTECTED] Sent: Mo

Re: [dom4j-user] version 1.5 - xpath ok & what ver jaxen?

2005-05-09 Thread Maarten Coene
David,   I assume you are talking about dom4j version 1.5 and 1.6 ... The resolution was that the xpath statements were not correct, the newer version of jaxen is more strict on this.   You can use any 1.1 version of jaxen with dom4j, you can find beta versions of this 1.1 version on the jaxen webs

Re: [dom4j-user] xml in BIG5 encoding - incorrect result

2005-05-09 Thread Maarten Coene
David,   could you send us some code showing how you are reading the XML file?   regards, MaartenDavid Thielen <[EMAIL PROTECTED]> wrote: Hi;   When I have an xml file in BIG5 encoding, I don’t get back the correct character values for 2 byte literals. Any idea as to why?   Thanks – dave  

Re: [dom4j-user] Convert from w3c Node to dom4j Node

2005-04-21 Thread Maarten Coene
Hi,   you can use org.dom4j.io.DOMReader for converting w3c Documents to dom4j Documents.   regards, Maarten"Punnoose, Roshan" <[EMAIL PROTECTED]> wrote: Hey guys,   How do you convert from a w3c Node to a dom4j Node? Is there a utility class for it in dom4j? Thanks   Roshan Punnoose Phone: 30

RE: [dom4j-user] problem with dom4j, struts, and WebSphere

2005-04-20 Thread Maarten Coene
David,   if you can find the dom4j jar, you should delete the org.xml.sax.* classes from it (they were included in the 1.4 release of dom4j)   regards, MaartenDavid Thielen <[EMAIL PROTECTED]> wrote: I believe 1.4 - it's a customer of ours and there is no way to verify theversion in use that I know

Re: [dom4j-user] problem with dom4j, struts, and WebSphere

2005-04-20 Thread Maarten Coene
What version of dom4j are you using in your ear? regards, Maarten David Thielen wrote: Hi; Has anyone heard of this: Anytime when there is dom4j in EAR, whether it is referenced or not, Loading of struts fails. It throws the below error. I tried to find dom4j in the websphere 4.0 classpath

[dom4j-user] [announcement] dom4j 1.6 released!

2005-04-15 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.6 release! http://dom4j.org dom4j: the flexible XML framework for Java Changes in this version include: New Features: o Added a methods to SAXReader allowing to specify the encoding used when reading XML sources. Thanks to Filip Jirsak. o Added a

Re: [dom4j-user] Is jaxen still needed with dom4j

2005-03-29 Thread Maarten Coene
Hi David,   - if you are using xpath, you'll have to include the jaxen jar in your classpath - you don't need the Aelfred2 parser if you are using another XML parser (like Xerces). I don't know about java 1.3, but java 1.4+ already comes with an XML parser (Crimson), so you don't need Aelfred2 or X

Re: [dom4j-user] org.dom4j.Document.select* methods

2005-03-11 Thread Maarten Coene
If you want to use XPath objects, you can use the methods on XPath to evaluate your expressions against your documents ... regards, Maarten David J. M. Karlsen schreef: All these methods take strings as arguments for the xpath-expressions. Does it make any performance points to take in XPath obje

Re: [dom4j-user] Thread safetiness of org.dom4j.xpath.DefaultXPath

2005-03-11 Thread Maarten Coene
Hi David, This class is not thread-safe! If you have multiple threads accessing the same XPath instance, you should synchronized it yourself. However, it might be possible that you can run xpath queries in parallell *on one document* using the same instance of DefaultXPath (I did not test it tho

Re: [dom4j-user] Usage of thread locals - problems in web apps

2005-03-09 Thread Maarten Coene
Hi Catalin, the CVS version of dom4j contains a solution for this problem. Could you try it out and let me know if there still are issues with it? regards, Maarten Catalin Grigoroscuta schreef: Hello, I've recently debugged an infamous memory leak on a web application, which occurred when the ap

Re: [dom4j-user] removing encoding from node.asXML()?

2005-03-07 Thread Maarten Coene
Hi Andreas,   the asXML() method just provides you an easy way to get a default Sting-value of your document. However, if you want to make changes to this default format, you'll have to use the XMLWriter, e.g.:   Document document = ...; OutputFormat format = OutputFormat.createPrettyPrint(); forma

Re: [dom4j-user] make dom4j build the DOM using customized elements

2005-03-05 Thread Maarten Coene
Hi Michael,   you have to specify your documentfactory with the SAXReader. You can do this by calling the setDocumentFactory() method, or by passing your factory to the constructor of SAXReader.   regards, MaartenMichael Wenger <[EMAIL PROTECTED]> wrote: Hi!I need to use customized Elements, which

Re: [dom4j-user] java.lang.NoClassDefFoundError: org/saxpath/SAXPathException - Problems migrating from dom4j 1.3 to 1.5.2

2005-03-03 Thread Maarten Coene
You should use a more recent version of jaxen, e.g. the one that comes with dom4j or the one you can download from ibiblio: http://www.ibiblio.org/maven/jaxen/jars   regards, MaartenJimisola Laursen <[EMAIL PROTECTED]> wrote: Hi!I am trying to upgrade my application to use the latest dom4j version

Re: [dom4j-user] selectSingleNode() with different Namespaces do not work

2005-03-02 Thread Maarten Coene
Marc,   I'm not sure of it and I cannot test if from here, but this could be a shortcomming of dom4j to resolve namespaces in xpaths that are nested inside other elements.   What happens if you declare your prop-namespace in your Envelope element?   regards, MaartenMarc Pellmann <[EMAIL PROTECTED]>

Re: [dom4j-user] CDATA parse error, help please

2005-02-28 Thread Maarten Coene
I can reproduce your problem if I use the XPP XMLParser that comes along with dom4j in the pull-parser-2.jar You can solve your problem by using another parser, for instance the one that comes with Xerces. You can do this by putting the Xerces jar before the pull-parser jar in your classpath. r

Re: [dom4j-user] Rule Examples

2005-02-23 Thread Maarten Coene
You can find an example in the dom4j cookbook: http://www.dom4j.org/cookbook.html   regards, MaartenJojy Varghese <[EMAIL PROTECTED]> wrote: Hi AllI am looking for some examples to make use of the "Rule" interface .Any help is appreciated.thanksJojy G Varghese---

Re: [dom4j-user] XML Encryption and Signature Support

2005-02-17 Thread Maarten Coene
Chad,   I didn't use it myself, but there is an external project that might be interesting for you: http://dev.neuclear.org/xmlsig/index.html   there are currently no plans to add encryption and signature support to dom4j.   regards, MaartenChad La Joie <[EMAIL PROTECTED]> wrote: I was wondering if

Re: [dom4j-user] i need dom4j.jar

2005-02-16 Thread Maarten Coene
Hi,   You can download the dom4j jar directly from the sourceforge download page: http://sourceforge.net/project/showfiles.php?group_id=16035   You can download the related jars from the maven repository for example:http://www.ibiblio.org/maven/   regards, Maartensathya arul kumar <[EMAIL PROTECTED

Re: [dom4j-user] bug: processing current node in stylesheet

2005-01-31 Thread Maarten Coene
2005 01:57:44 +1100, Brett Porter <[EMAIL PROTECTED]>wrote:> https://sourceforge.net/tracker/index.php?func=detail&aid=1112068&group_id=16035&atid=316035> > Thanks,> Brett> > > On Sat, 29 Jan 2005 15:29:15 +0100, Maarten Coene> <[EMAIL PROTECTED]>wrot

Re: [dom4j-user] bug: processing current node in stylesheet

2005-01-29 Thread Maarten Coene
Hi Brett, can you attach your patch and test to that issue so I can add it to CVS? thanks! Maarten Brett Porter schreef: Hi, I've hit the problem that the following change addresses: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1077692&group_id=16035 is anyone able to apply this? I

Re: [dom4j-user] XSLT at the Node Level

2005-01-25 Thread Maarten Coene
All patches are welcome :-) regards, Maarten Edwin Dankert schreef: Yes, that constructor does not seem to be very intuitive. To get around this problem you could try the following code: ... DocumentFactory factory = DocumentFactory.getInstance(); Document doc = factory.createDocument( element.crea

Re: [dom4j-user] Patch?

2005-01-11 Thread Maarten Coene
Hi Brian, I couldn't find some free time to take a look at it, but I will do this as soon as possible. regards, Maarten Brian Topping schreef: Hi Maarten, I submitted a patch a few weeks ago to get factories working again, and you correctly pointed out at the time that I didn't actually attach

Re: [dom4j-user] Where is the jaxen-1.1-beta-4 source?

2005-01-10 Thread Maarten Coene
Randal,   The jaxen jar comes from ibiblio: http://www.ibiblio.org/maven/jaxen/jars/   I guess you can find the code by checking out the sources from the jaxen project specifying the date the beta-4 jar has been built.   regards, MaartenRandal Walser <[EMAIL PROTECTED]> wrote: Can anyone tell me wh

Re: [dom4j-user] How to find the concrete interface implementation?

2005-01-04 Thread Maarten Coene
Gary,   you can find the default dom4j implementation of these interfaces in the org.dom4j.tree package   regards, Maartengary wang <[EMAIL PROTECTED]> wrote: Hello everyone:     When I read the source codes of dom4j, I hava a problem.     The interfaces of Document, Element, and so on, are just

Re: [dom4j-user] org.w3c.dom.Element <-> org.dom4j.Element

2004-12-22 Thread Maarten Coene
h the org.dom4j.Document and org.w3c.dom.Document interface. regards, Maarten Ben Munat schreef: Maarten Coene wrote: DOMDocumentFactory factory = new DOMDocumentFactory(); SAXReader reader = new SAXReader(factory); InputStream in = [...] // your XML file for instance org.dom4j.Document dom4jDoc = reader.re

RE: [dom4j-user]

2004-12-22 Thread Maarten Coene
Hi David,   the "official" way to request a new feature is adding it to the RFE list on sourceforge: http://sourceforge.net/tracker/?group_id=16035&atid=366035   optionally, if you want such an RFE to be added very quick; you should add a patch to the RFE.   In the meantime, you could solve your pr

Re: [dom4j-user] org.w3c.dom.Element <-> org.dom4j.Element

2004-12-22 Thread Maarten Coene
Hi Tony,   there are 2 main scenario's for working with DOM/DOM4J together:   1. using DOMReader/DOMWriter: this convert a DOM tree to a DOM4J tree and visa versa:   // convert DOM4J -> DOM DOMWriter writer = new DOMWriter(); org.dom4j.Document dom4jDoc = [...]; org.w3c.dom

Re: [dom4j-user] Two suggested improvements for dom4j

2004-12-16 Thread Maarten Coene
David Thielen schreef: Hi all; Well, after getting through the Microsoft SpreadsheetML xml format, I’ve found two things I think dom4j could really use. 1. Apparently you can state that white space and cr/lf are part of an element and need to be preserved. So hi there is different

Re: [dom4j-user] a program to comb out

2004-12-16 Thread Maarten Coene
Johannes, the List of Nodes you receive should still contain the link to their parents. If that is not the case, it's a bug. regards, Maarten Johannes Franz schreef: Am Sonntag, 12. Dezember 2004 20:57 schrieb Maarten Coene: Hi Maarten, the problem is, that the selectNodes method returns a

Re: [dom4j-user] How to addElement with no xmlns=""

2004-12-09 Thread Maarten Coene
there a way to do that? Thanks - dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maarten Coene Sent: Thursday, December 09, 2004 4:27 AM To: David Thielen Cc: [EMAIL PROTECTED] Subject: Re: [dom4j-user] How to addElement with no xmlns="" Davi

Re: [dom4j-user] Turning off namespaces when reading in an XML file.

2004-12-09 Thread Maarten Coene
Hi Alan, I don't think this is possible with the current version of dom4j. If you really need it, please add a feature request at sourceforge to make sure we won't forget it regards, Maarten Alan Bron wrote: Hi: Does anyone out there know how to turn off namespace checking when using dom4j? The

Re: [dom4j-user] Need to set xml as Element text

2004-12-09 Thread Maarten Coene
Hi David, I think you should subclass org.dom4j.io.XMLWriter and override the escapeElementEntities(String text) method to not escape the <> characters and to convert your '\n' to the appropriate &#xxx Take a look at the current implementation of that method: http://www.dom4j.org/xref/org/dom4j/i

Re: [dom4j-user] insert an element

2004-12-09 Thread Maarten Coene
Hi Ben, David, as far as I know this is indeed the only way to add child Nodes at a given position: int position = [...]; // the position of the new element Element newElement = [...]; // the new element Element parent = [...]; List children = parent.elements(); children.add(position, newEleme

Re: [dom4j-user] How to addElement with no xmlns=""

2004-12-09 Thread Maarten Coene
David, you add your element with no namespace information, This means that your element doesn't belong to a namespace, that's why the default namespace is set to "". However, I think you want your element to be part of the default namespace of your workbook, so you'll have to add your eleme

Re: [dom4j-user] how to avoid printing DTD information

2004-12-07 Thread Maarten Coene
Hi,   my guess is that your DTD defines default values for these attributes. dom4j doesn't provide support yet to ignore these attribute values when writing the XML.   At the moment, the only solution is to remove these default values from your DTD.   regards, MaartenHong Qian <[EMAIL PROTECTED]>

Re: [dom4j-user] CDATA and XSL

2004-11-19 Thread Maarten Coene
Can you give us a simple example that illustrates the problem? (java code, xml and xsl)   regards, MaartenJason Rousell <[EMAIL PROTECTED]> wrote: Hi,I'm using dom4j-1.5.2.jar, xalan and xerces and having a problem withtransforming xml with a cdata section that itself contains xml.Using xerces/xala

Re: [dom4j-user] Problem getting node data.

2004-11-17 Thread Maarten Coene
Hi Jeff,   I couldn't test it out, but I think there is something wrong with your xpath.   Node node2 = document.selectSingleNode("//TestA/test[2]");   This will select the second test element: node2 = 2  String data2 = node2.valueOf("test");   This will select the value of the test child-element o

[dom4j-user] [ANN] dom4j 1.5.2 released!

2004-11-16 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.5.2 release! http://dom4j.org dom4j: the flexible XML framework for Java Changes in this version include: New Features: o Added a SAXEventRecorder that can replay SAX events at a later time. This provides an alternative serialization approach. Re

Re: [dom4j-user] Using selectNodes with detached elements

2004-11-16 Thread Maarten Coene
Hi Andreas,   if I remember correctly (I don't have access to the sources from here), the nodes have to be part of a document if you execute an XPath query on them.   hope this helps   MaartenAndreas Brillisauer <[EMAIL PROTECTED]> wrote: Hello,I have parsed an OpenOffice.org document (content.xml

Re: [dom4j-user] "document node" returned by selectNodes()

2004-11-10 Thread Maarten Coene
what is the content of your "test.xml" file ?   regards, MaartenBarnabas Davoti <[EMAIL PROTECTED]> wrote: List list = node.selectNodes("//A");Iterator it = list.iterator();while (it.hasNext()) {Node node = (Node) it.next();node.getName() returns 'file:/C:/work/project/fk/conv/test/input/test.xml'n

Re: [dom4j-user] problem with tags "disappearing" during creation of xml doc

2004-11-04 Thread Maarten Coene
Hi, I couldn't reprocude your problem. The following code generates the correct XML: Document doc = DocumentFactory.getInstance().createDocument(); Element grandFather = doc.addElement("grandfather"); Element parent1 = grandFather.addElement("parent"); Element child1 = parent1.addElement("child1"

Re: [dom4j-user] (no subject)

2004-10-30 Thread Maarten Coene
Mike, I couldn't reproduce your problem with a simple junit test: public void testAddCloneToOtherElement() { DocumentFactory factory = DocumentFactory.getInstance(); Document doc = factory.createDocument(); Element root = doc.addElement("root"); Element parent1 = root

[dom4j-user] [ANN] dom4j 1.5.1 has been released !

2004-10-29 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.5.1 maintenance release! You can find a download link on http://www.dom4j.org Changes in this version include: New Features: o Added support for the XPP3 parser. Thanks to Pelle Braendgaard. Fixed bugs: o Fixed problem where the namespace prefix w

Re: [dom4j-user] Set the value of a Namespace Node

2004-10-29 Thread Maarten Coene
Hi Juraj,   I'm not sure what you are trying to do, but a Namespace Node is in fact a special Attribute Node (however, it does not extend Attribute). For instance: if you create a Namespace Node (prefix: "mypref", uri: "myuri") and add it to an Element, in the corresponding XML that element will ha

Re: [dom4j-user] Basic question about serialization, namespaces, and DOMDocument

2004-10-28 Thread Maarten Coene
Ara Vartanian wrote: I need a org.dom4j.dom.DOMDocument rather than merely a org.dom4j.Document, because my XML files have mixed content, and, as I far as I understand (I easily could be wrong), Document doesn't support mixed content. there is no need to use DOMDocument : the default org.dom4j.Docu

Re: [dom4j-user] Basic question about serialization, namespaces, and DOMDocument

2004-10-27 Thread Maarten Coene
Hi Ara,   could you provide us some code that illustrates how you create your dom4j document (variable d in your example)   thanks MaartenAra Vartanian <[EMAIL PROTECTED]> wrote: I'm using dom4j 1.5 and I'm having a problem whenserializing tags of the form:with code like:OutputFormat outformat = Ou

Re: [dom4j-user] Next release?

2004-10-20 Thread Maarten Coene
Hi David, I'm busy preparing a dom4j 1.5.1 maintenance release which will be released shortly. I can't give you an exact date though cause almost all my time is going to some other projects at the moment regards, Maarten David J. M. Karlsen wrote: When will the next release of DOM4J be? I'm wond

Re: [dom4j-user] dom4j xpath not finding anything

2004-10-08 Thread Maarten Coene
Hi there, I tried a few tests and it seems like a jaxen bug to me which does not seem to process "//myNodeName" expressions correctly. if someone could mail me an example that works for instance with jdom/jaxen (or dom/jaxen) and not with dom4j/jaxen, I would greatly appreciate it :-) regards,

[dom4j-user] [announcement] dom4j 1.5 released!

2004-09-03 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.5 release! http://dom4j.org dom4j: the flexible XML framework for Java Changes in this version include: New Features: o Added initial JAXB support. Thanks to Wonne Keysers. o Added getXMLEncoding() method to org.dom4j.Document which returns the en

Re: [dom4j-user] bug in Stylesheet.removeRule(Rule)

2004-08-22 Thread Maarten Coene
Hi Peter, I've added your fix to CVS. Thanks for reporting this bug :-) regards, Maarten Peter Stibrany wrote: Hello, while reading about dom4j rules, i found this tiny bug... In Stylesheet.java (org.dom4j.rule.Stylesheet), there is: public void removeRule( Rule rule ) { ruleManager.add

Re: [dom4j-user] Create and parse simple xml under java 1.1

2004-08-16 Thread Maarten Coene
dom4j uses the collections API introduced in 1.2. Perhaps you can try to download the collections extension for JDK1.1 and rename all the "collection imports" to the names of the extension? But I'm not sure that's the only place where dom4j doesn't work nicely with JDK1.1 And perhaps jaxen also

Re: [dom4j-user] problem with numeric character reference

2004-08-16 Thread Maarten Coene
Hi Kevin, this is something the SAX parser does, I don't think that you can disable this behaviour (although I saw tricks for this on the xerces user mainling list a while ago, perhaps you could try to search their archives) regards, Maarten Kevin Varley wrote: Hello all, I'm having some troubl

Re: [dom4j-user] bug in xpath

2004-08-16 Thread Maarten Coene
Hi, I'm not sure what to think of this issue. The thing is that you are trying to run an xpath-expression on an invalid XML document (valid XML documents must have a root element!). I believe that an exception should be thrown if you try to select nodes using xpath on such documents (but not a

Re: [dom4j-user] namespace defaulting

2004-08-10 Thread Maarten Coene
Hi Tom, how do create the dom4j object model? If I try to build your xml document like this, it seems to work fine ... Document doc = DocumentHelper.createDocument(); Element processDef = doc.addElement("process-definition", "http://jbpm.org/statedefinition-2.0-beta3";); Element start

Re: [dom4j-user] moving elements ina list

2004-08-10 Thread Maarten Coene
wrote: Maarten Coene wrote: Robert, this is fixed now in CVS. Thanks for reporting! Is this the cvs repository? cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/dom4j login cvs -z3 -d :pserver:[EMAIL PROTECTED]:/cvsroot/dom4j co dom4j I grabbed it, built and tested but do not see the fix. Is there a

Re: [dom4j-user] moving elements ina list

2004-08-10 Thread Maarten Coene
Robert, this is fixed now in CVS. Thanks for reporting! Maarten Robert Koberg wrote: Robert Koberg wrote: Hi, I am trying to move elements in a list with, by placing the element to move after an element that was found to be the previous element: list children = parentElem.elements(); This was su

Re: [dom4j-user] Asking again: setText() doesn't convert to utf-8

2004-08-09 Thread Maarten Coene
Hi David, if you want to convert these characters greater than 0x7f, you'll have to create your xml like this: org.dom4j.Document document = [...] org.dom4j.io.XMLWriter writer = new org.dom4j.io.XMLWriter(); java.io.StringWriter strWriter = new java.io.StringWriter(); writer.setWriter(strWriter)

Re: [dom4j-user] Entity expansion limit?

2004-07-10 Thread Maarten Coene
Chip, You can solve your problem in some ways: - use dom4j 1.5 RC1: in this release, your apostrophes won't be converterd to "'" anymore (they won't be converted to anything) or - read the JAXP release notes where solutions are described to change this entity expansion limit: http://java.sun.com

[dom4j-user] [announce] dom4j 1.5 RC1 released

2004-07-04 Thread Maarten Coene
The dom4j team is pleased to announce the dom4j 1.5-rc1 release! http://www.dom4j.org Changes in this version include: New Features: o Added method to Element to retrieve all Namespaces for a given URI. Thanks to Thomas Diesler. o Added a booleanValueOf(Object node) method to XPath. Thanks to Ben

Re: [dom4j-user] incompatibility with 1.4 (1.5b1?)

2004-06-25 Thread Maarten Coene
if you replace "/HTML/HEAD/[EMAIL PROTECTED] eq 'description']/@content" with "/HTML/HEAD/[EMAIL PROTECTED]'description']/@content" an attribute is returned instead of an element. Very strange... This seems more like a jaxen issue to me... regards, Maarten [EMAIL PROTECTED] wrote: On Friday 25 J

Re: [dom4j-user] incompatibility with 1.4 (1.5b1?)

2004-06-25 Thread Maarten Coene
This is a bug, your xpath expression should return an attribute. However, I was unable to reproduce your problem (I tried it with the current CVS version of dom4j and with 1.5 beta1). Could you provide your classpath? Maybe there is a problem in there... And just to be sure if your example belo

Re: [dom4j-user] IndexOutOfBoundsException on attribute List

2004-06-25 Thread Maarten Coene
Hi Robert, glad you found a solution :-) The reason your code failed is this: when you detach the attribute from the newElem, it is also removed from the attrs List. So the way you iterate through that list is not correct. regards, Maarten Robert Koberg wrote: So looking closer at the API, I see

Re: [dom4j-user] ConcurrentModificationException

2004-06-22 Thread Maarten Coene
Do you get the same problem if you use dom4j 1.5 beta 2?? Maarten On Tue, 22 Jun 2004 [EMAIL PROTECTED] wrote: > Hi! > > I posted the problem recently and actually got it working - until now. For > some mysterious reason it suddenly does throw an > ConcurrentModifcationException in my Visitor (s

[dom4j-user] comparing nodes (was: RE: bug in serialization)

2004-06-22 Thread Maarten Coene
The reason is that dom4j nodes use identity based equality: 2 nodes are equal if they reference the same object instance. In your case: the documents are different objects, so the nodes will be different objects too and the equals() method will always return false. To solve your problem: you co

Re: [dom4j-user] TreeTable or Nested Table editor

2004-06-22 Thread Maarten Coene
John, you can contribute your code be sending it directly to me or by uploading it to the patches tracking system at sourceforge: http://sourceforge.net/tracker/?group_id=16035&atid=316035 thanks, Maarten John Sharp wrote: Also, I'd like to contribute my editable table code - someone from the pr

Re: [dom4j-user] read and write with dom4j gets an unvalid xml

2004-06-21 Thread Maarten Coene
Marc, I've submitted a patch to CVS which should solve your problem. Please could you try the code on CVS to verify that your problem is solved. Note: anonymous CVS is not always up-to-date with the developer CVS, so it's possible that the patch is not in anonymous CVS yet and you have to wait

Re: [dom4j-user] Concerning CData and pretty print

2004-06-18 Thread Maarten Coene
Nicolas, are you having this problem with dom4j 1.5? There was a bug in dom4j 1.4 where the XML reader created multiple CDATA sections, but this should be solved in 1.5 where only 1 CDATA node is created. regards, Maarten Raggueneau Nicolas wrote: Hello, i have to save preformatted text inside a

Re: [dom4j-user] Removing Nodes

2004-06-16 Thread Maarten Coene
What happens if you try "n.detach();" instead of "doc.remove(n);" And could you provide us a stacktrace of that NullPointerException? regards, Maarten [EMAIL PROTECTED] wrote: Hi! I try to remove all s from a Document but this seems to be somewhat tricky :-) I'd prefer to use a Visitor; the code

Re: [dom4j-user] replace a given node by another node

2004-06-16 Thread Maarten Coene
The Element API doesn't provide support for what you want to do, however you could try it using the List API on the content of the parent element: For instance: Element parent = ... Element a = ... Element b = ... List contentOfParent = parent.content(); int index = contentOfParent.indexOf(a); co

Re: [dom4j-user] Element order

2004-06-11 Thread Maarten Coene
Hi Mark, I don't think there is a proper API for the things you want to do. However, you could use this 'hack' to solve your problem: instead of adding the "name" and "addr" elements to the person element, you could add them to the list returned by the Element.elements() method: Element person

Re: [dom4j-user] Get text

2004-06-10 Thread Maarten Coene
Raph, see the javadoc of SAXReader to specify the SAX Parser of your choice. http://www.dom4j.org/apidocs/org/dom4j/io/SAXReader.html regards, Maarten Raph FRIF wrote: Hello, I use dom4j in my application and I would like to know if it is possible to change the parser of dom4j. When I read a

Re: [dom4j-user] Default attributes rendered from DOM

2004-06-10 Thread Maarten Coene
Hi Paul, these default attribute values are specified in the XHTML DTD. When parsing your file, dom4j uses a SAX parser. It's that SAX parsers that passes the attribute values to dom4j (including the attribute with default values as specified in the DTD). So this is hard to solve at the dom4j l

Re: [dom4j-user] method getText

2004-06-08 Thread Maarten Coene
Hi Sevastian, take a look at the XMLWriter.escapeElementEntities(String) method. I know it's protected so you probably can't access it from within your sources, but if this fits your needs, we could move that code to some util class. you can find that method here: http://www.dom4j.org/xref/org/

Re: [dom4j-user] createCopy() and clone() do not work with my custom DocumentFactory

2004-06-08 Thread Maarten Coene
Website updated ... thanks Maarten Travis Stevens wrote: I think that source forge changed its subscription mechanism. You must now go to http://lists.sourceforge.net/lists/listinfo/dom4j-user in order to subscribe to the mailing list. On a side not, the configuration file for maven contains wr

Re: [dom4j-user] Please make JavaDoc link more accessible

2004-06-01 Thread Maarten Coene
p, Hunter On Tuesday 01 June 2004 12:47, Maarten Coene wrote: done! Thanks for the suggestion! regards Maarten Hunter Kelly wrote: Hiya, everytime I want to look at the dom4j JavaDoc's I spend about 2-3 minutes hunting through the home page trying to find the link for the JavaDocs. Coul

Re: [dom4j-user] Please make JavaDoc link more accessible

2004-06-01 Thread Maarten Coene
done! Thanks for the suggestion! regards Maarten Hunter Kelly wrote: Hiya, everytime I want to look at the dom4j JavaDoc's I spend about 2-3 minutes hunting through the home page trying to find the link for the JavaDocs. Could someone add the JavaDoc link to the left hand nav panel, or even th

Re: [dom4j-user] Adding items to a DocumentTreeModel

2004-05-21 Thread Maarten Coene
Hi Andreas, I think you should extend the org.dom4j.swing.LeafTreeNode and org.dom4j.swing.BranchTreeNode so that they implement the javax.swing.tree.MutableTreeNode interface. You should take a look at the Java Tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#dynam

Re: [dom4j-user] [announce] dom4j 1.5 beta2 released

2004-05-17 Thread Maarten Coene
Thierry Hanser wrote: After a long silence just a small message to say THANKS for the new releases and just to witness that there are many people supporting this project. with pleasure :-) Looking forward to contribute more effectively as soon as I will get a bit more time. all contributions are

Re: [dom4j-user] (no subject)

2004-05-17 Thread Maarten Coene
Hi Raph, I don't think this is possible using the current dom4j api's. If you really need this, please enter a new RFE at the dom4j project site ( http://sourceforge.net/tracker/?group_id=16035&atid=366035 ) and some day someone will pick it up to implement it. But if you want to be sure it's a

[dom4j-user] [announce] dom4j 1.5 beta2 released

2004-05-12 Thread Maarten Coene
Hi, dom4j 1.5 beta 2 has been released. You can download it from http://www.dom4j.org A list of changes is given below: - Added flag to OutputFormat that supresses newline after XML declaration. - Upgraded dependencies to their latest version on ibiblio. - Added method to DocumentHelper that allo

Re: [dom4j-user] Unresolve entities

2004-05-07 Thread Maarten Coene
Hi Raph, you could try the following solutions: - register your own EntityResolver with the org.dom4j.io.SAXReader which ignores the problematic external entity. or - disable the external entities using org.dom4j.io.SAXReader.setFeature(, false), where the possible features can be found at htt

Re: [dom4j-user] org.w3c.dom.Element -> dom4j.Element?

2004-05-06 Thread Maarten Coene
Hi David, If you think about it, converting an org.w3c.dom.Element to a org.dom4j.Element is not that easy: what should you do with namespaces (declared elsewhere in an ancestor of the element), what should be the parent of the newly created dom4j.Element, ... That's why you can't use the rea

Re: [dom4j-user] Validation of dom4j document

2004-04-15 Thread Maarten Coene
Hi Wei, you could take a look at the 'cookbook', you can find it at http://www.dom4j.org/ Also, take a look at the SAXValidatorDemo example in the samples/validate/ directory. is this the information you are searching for ? regards, Maarten Wei Hsu wrote: Hi all, I was reading the FAQ whe

Re: [dom4j-user] Question on setting nodes to be read-only

2004-04-14 Thread Maarten Coene
Hi Wei, I don't think it's possible to set a node read-only at the moment ... If you really need it, please create a RFE at http://sourceforge.net/tracker/?group_id=16035&atid=366035 . regards, Maarten Wei Hsu wrote: Hi all, I am new to Dom4J, so please bear with me. Anyway, I'm looking

Re: [dom4j-user] DocumentException while resolving the DTD

2004-04-09 Thread Maarten Coene
Hi Olav, this is a bug in the Crimson parser, you'll have to use another parser (like Xerces, Aelfred, ...) for instance, you could specify the XmlReader class like this: SAXReader reader = new SAXReader("org.apache.xerces.parsers.SAXParser"); of course, you can specify the parser of your choice

Re: [dom4j-user] Getting Null Pointer exception in XPATH execution

2004-04-06 Thread Maarten Coene
I fail to understand is that how come an XML just by formatting it properly can stop giving exceptions Ne ideas With best regards, Shekhar Srivastava -Original Message- From: Maarten Coene [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:19 PM To: Shekhar Srivastava Cc

Re: [dom4j-user] Dom4j -NoClassDefFoundError.

2004-04-06 Thread Maarten Coene
Hi Olav, It's hard to tell which class is missing ... Could you send the whole stacktrace ? regards, Maarten Olav Nærland wrote: Hi! I am having difficulties using Dom4j-1.4 in Eclipse (2.1.2). I have added the Dom4j-full.jar to my Java Build Path and I get no compilation errors when using c

Re: [dom4j-user] Getting Null Pointer exception in XPATH execution

2004-04-01 Thread Maarten Coene
Hi Shekhar, Which version of Xalan do you use? (use org.apache.xalan.Version for this) The problem could be the DOM implementation of DOM4J which is very basic and is far from DOM compliant at the moment. What happens if you set the documentClass of the DOMWriter to "org.apache.xerces.dom.Docum

[dom4j-user] [announce] dom4j 1.5 beta1 released

2004-03-26 Thread Maarten Coene
Hi all, a first beta of the new dom4j has been released and can be downloaded from http://www.dom4j.org/index.html . This release contains several bugfixes and patches, like: - Fixed encoding bug in Document.asXML() and DocumentHelper.parseText(). - Fixed bug in SAXReader that caused problems r

Re: [dom4j-user] parsing and analysing schemas

2004-03-22 Thread Maarten Coene
Hi Amit, could you be more specific about what you try to do and what your problems are. regards, Maarten amit shetty wrote: Hey folks, I have tried a lot, searched a lot, and I am not able to figure out how to do this. Would really appreciate it if you guys could help me on this. I need to lo

  1   2   >