Stephen's right, characters like < > & must be encoded (escaped) as < or > or &.
Joe your other option is to use a CDATA section which can include < > etc <![CDATA[ if((people.size() > 15) || (people == null)) ]]> James ------- http://radio.weblogs.com/0112098/ ----- Original Message ----- From: "Stephen C. Upton" <[EMAIL PROTECTED]> To: "Joe" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, February 19, 2003 1:38 AM Subject: Re: [dom4j-user] Getting a comment, parsing > < " > Joe, > > I couldn't find it anywhere, but I think you have to use ;> (or > something like that) for the ">" sign within an element's value. Might > even be in the w3c docs. > > HTH > steve > > Joe wrote: > > > Hi I need to have something like this in my document: > > > > <...> > > <Clause> > > if((people.size() > 15) || (people == null)) > > </Clause> > > </...> > > > > However xml spec states that you can't have < (or > is > > it??? which one it is doesn't matter). > > > > So I assume dom4j wont parse this. So I thought I > > would do > > > > <Clause> > > <!--if((people.size() > 15) || (people == null)) --> > > </Clause> > > > > then use clauseElement.getText() and strip leading > > <!-- and trailing -->. But is there a way to use > > something like clauseElement.getComment().getText() > > ??? I couldn't find it in the JDocs. Just neater and > > simpler. > > > > Thanks, > > Joe > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Shopping - Send Flowers for Valentine's Day > > http://shopping.yahoo.com > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. > > The most comprehensive and flexible code editor you can use. > > Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. > > www.slickedit.com/sourceforge > > _______________________________________________ > > dom4j-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/dom4j-user > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. > The most comprehensive and flexible code editor you can use. > Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. > www.slickedit.com/sourceforge > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dom4j-user > __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user