I think I've figured out the source of the error, but I think it may be prudent to modify dom4j to adjust for such a circumstance:
The author of the HTML document that I am converting to XHTML with JTidy, and then modifying with dom4j included an embedded unordered list that worked in the following manner: <ul> <ul> <li/> <ul> <li/> </ul> <li/> </ul> </ul> This results in a double indentation of the text in the document. It seems a bit odd to do this, but I suppose it occassionally occurs in other documents as well. Anyhow, when I attempt to use an xpath expression like "ancestor::ul" on a <ul> element as I showed in my example, I end up with a null pointer exception for this embedded list. I'm assuming that the expression parser becomes confused by the fact that the parent element is the same as the child (which admittedly is a bit odd). Does this make sense, James???? Rob _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user