That's hardly helpful...

Assuming that "xmlobj" is your parent object (that you want to check),
then simply do

boolean empty = xmlobj.newCursor().toNextToken().isEnd();

Radu

On Tue, 2007-10-02 at 18:29 -0700, jimmy Zhang wrote:
> I think you should try VTD-XML for that
> http://vtd-xml.sf.net
> 
> ----- Original Message ----- 
> From: "zulu" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, October 02, 2007 5:21 PM
> Subject: how to find out if child elements are empty
> 
> 
> >
> > Hi All,
> >
> > We are currently working on a huge xml payload (constructing as well as
> > consuming xml) through XMLBeans.
> > In this case we are constructing a payload.
> > The scenario we are encountering problem is say we have a parent element
> > this does not have a value but comprises of other child elements.
> > Now the application is such that the population of the child elements is
> > different routine and many conditions have to be met before the child
> > elements of this parent get populated.
> > Whereas the parent element gets created early on. So in a few scenarios 
> > the
> > child elements will not be populated but the parent node has already got
> > created. In such cases we want to remove the parent node.
> >
> > We want to have a check to see if none of the child elements of this 
> > parent
> > are set then unset the parent element. Is there a way to achieve the same.
> > Do post your thoughts.
> >
> >
> > -- 
> > View this message in context: 
> > http://www.nabble.com/how-to-find-out-if-child-elements-are-empty-tf4559150.html#a13010839
> > Sent from the Xml Beans - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to