Hi,
I am new with dom4j...
All works well but I have a question about this point :
I select an Element from its xpath address :
The two parts of code are working :
Element richText_Element =
(Element) xpoix_Element.selectSingleNode("richDesc[@type='product']/richText");
richText_Element = richText_Element.addText(rt + ", station : " + nb);
or :
DocumentFactory I_DocumentFactory = new DocumentFactory();
XPath xpath = I_DocumentFactory.createXPath("richDesc[@type='product']/richText");
Element richText_Element = (Element) xpath.selectSingleNode(xpoix_Element);
richText_Element = richText_Element.addText(rt + ", station : " + nb);
But when the element "richDesc[@type='product']/richText" is not present in the document,
the program crashes without Exception...
Is it normal or Is sth missing in my code ?
Thank you for your help,
Regards.
François Paulus.