Hello,
I have some questions concerning documents.
1. How can merge two documents, if both documents have elements with the
same name
on the same level?
Is there a possibility to avoid the IllegalAddException ?
Is there some kind of automatism?
2. I have an document created with
document = IndexedDocumentFactory.getInstance().createDocument();
then I append some elements and after this I want to search for nodes:
List list = document.selectNodes( "//test/testelement" );
I always get a the follwing Exception:
java.lang.NullPointerException
at
org.dom4j.util.IndexedElement.addToElementIndex(IndexedElement.java:212)
at
org.dom4j.util.IndexedElement.addToElementIndex(IndexedElement.java:207)
at
org.dom4j.util.IndexedElement.createElementIndex(IndexedElement.java:199)
at
org.dom4j.util.IndexedElement.elementIndex(IndexedElement.java:179)
at
org.dom4j.util.IndexedElement.elementIterator(IndexedElement.java:94)
at
org.dom4j.xpath.impl.NameTestStep.applyToChild(NameTestStep.java:176)
at org.dom4j.xpath.impl.UnAbbrStep.applyTo(UnAbbrStep.java:153)
at org.dom4j.xpath.impl.UnAbbrStep.applyTo(UnAbbrStep.java:121)
at
org.dom4j.xpath.impl.LocationPath.applyTo(LocationPath.java:109)
at
org.dom4j.xpath.impl.LocationPath.evaluate(LocationPath.java:58)
at org.dom4j.xpath.DefaultXPath.applyTo(DefaultXPath.java:370)
at org.dom4j.xpath.DefaultXPath.applyTo(DefaultXPath.java:359)
at
org.dom4j.xpath.DefaultXPath.selectNodes(DefaultXPath.java:142)
at
org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:148)
...........
and I don't know what could be wrong, because the errormessage is not
really helping ....
Could anyone help me?
Thank you in advance
Kerstin Gruenefeld
--
+--------------------------------------------------------------------+
| Kerstin Gruenefeld, Dipl.Math.techn. [EMAIL PROTECTED] |
| disy Informationssysteme GmbH http://www.disy.net |
| Stephanienstr. 30 Tel.: +49 721 16006-32 |
| D-76133 Karlsruhe, Germany Fax: +49 721 16006-05 |
+--------------------------------------------------------------------+
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dom4j-user