Re: How to check for null vaues in an XML String using java

Rob Mackie <[email protected]> Thu, 9 Dec 2004 22:17:18 -0500
Newsgroups gmane.comp.java.sun.xml.general
Message-ID <[email protected]>
How about you retrieve node for each element of interest.  Access it's
child node that carries the text of that element and then look at the
length of the text of the value associated with that node?  Or something
like that?  I think that's what I'd do.  I'm pretty sure there is no api
node.getEmptyChildren() or anything along those lines.

Regards,

Rob.

praveen kumar wrote:
> Hi Elliott,
>
> <*Name*>/_Ram_/</*Name*><*Address*>/_xyz_/</*Address*><*MRN*/>
>
> words in BOLD are *Elements(Node Name)*
> words in Italics and words are /_Element values(Node Values)_/
> /__/
> Here Nodes  (Name and Address) are having Values(Ram and xyz )
>
> *But MRN does not have a Nodevalue.*
> **
> *How do I find whether MRN is having value or not.*
> **
> **
> *Regards*
> *Praveen Kumar*
>
>
> */Elliotte Harold <[email protected]>/* wrote:
>
>     praveen kumar wrote:
>
>      > Hi Elliott,
>      > ok what ever u may call.
>      > I meant an element having NO value.
>      > I need to find the element having no value.
>
>     First you have to define what you mean by the value of an element. =
Then
>     you have to figure out which API you're using. There are many.
>
>     --
>     Elliotte Rusty Harold [email protected]
>     XML in a Nutshell 3rd Edition Just Published!
>     http://www.cafeconleche.org/books/xian3/
>     http://www.amazon.com/exec/obidos/ISBN=3D0596007647/cafeaulaitA/ref=
=3Dnosim
>
>     -----------------------------------------------------
>     xml-interest: A list for discussing XML technologies in the Java
>     Platform.
>     To post, mailto:[email protected]
>     Archives at: http://archives.java.sun.com/xml-interest.html
>     To unsubscribe, mailto:[email protected] the following message;
>     signoff xml-interest.
>
> -----------------------------------------------------------------------=
-
> Do you Yahoo!?
> The all-new My Yahoo! <http://my.yahoo.com> =96 What will yours do?
> ----------------------------------------------------- xml-interest: A
> list for discussing XML technologies in the Java Platform. To post,
> mailto:[email protected] Archives at:
> http://archives.java.sun.com/xml-interest.html To unsubscribe,
> mailto:[email protected] the following message; signoff xml-interes=
t.

-----------------------------------------------------
xml-interest: A list for discussing XML technologies in the Java Platform=
.
To post, mailto:[email protected]
Archives at: http://archives.java.sun.com/xml-interest.html
To unsubscribe, mailto:[email protected] the following message;
signoff xml-interest.