You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by makhno <ma...@yahoo.com> on 2007/08/17 23:24:30 UTC

Testing for emptiness

What's the right way to test whether my XMLObject is empty(no text within)?
-- 
View this message in context: http://www.nabble.com/Testing-for-emptiness-tf4288220.html#a12207401
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Testing for emptiness

Posted by Jacob Danner <ja...@gmail.com>.
I'm not sure of what your are asking specifically.
Do you mean has the XmlObject been initialized? or whether or not the
element has content (ie, <foo />)?
Have you tried using the cursor APIs for this? I think it would be the
easiest way to do so.

In general there are also APIs like xgetStringValue, xmlText, etc that
you can use to get the data you want and then check things like
String.length for size == 0.

-Jacob Danner

On 8/17/07, makhno <ma...@yahoo.com> wrote:
>
> What's the right way to test whether my XMLObject is empty(no text within)?
> --
> View this message in context:
> http://www.nabble.com/Testing-for-emptiness-tf4288220.html#a12207401
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org