In HTML, you should never have two ul's together, I think it should be:

<ul>
        <li>
                <ul>
                        <li>
                                <ul>
                                        <li/>
                                </ul>
                        </li>
                </ul>
        </li>
</ul>

However, that's just an FYI, I doubt that is the problem here.

Jim

                        

Jim Brain, [EMAIL PROTECTED]
"Researching tomorrow's decisions today."
(319) 369-2070 (work)
SYSTEMS ARCHITECT, INDIVIDUAL ITS, LIFE INVESTORS INSURANCE COMPANY OF
AMERICA

 -----Original Message-----
From:   Robert J. Lebowitz [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, December 07, 2001 10:09 AM
To:     [EMAIL PROTECTED]
Subject:        [dom4j-user] xpath problem, a clue to the problem.

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

_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to