[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xom-interest
Subject:    Re: [XOM-interest] Element.getValue()
From:       Nils_Kilden-Pedersen () Countrywide ! Com
Date:       2003-05-22 20:44:23
Message-ID: OFB2ECE8DC.49D2D98D-ON88256D2E.0071C544-88256D2E.0071EBA5 () countrywide ! com
[Download RAW message or body]

You could do something like this:

for (int i = 0; i < rung.getChildCount(); i++) {
   Node node = rung.getChild(i);
   if (node instanceof Text) {
      // Do something
   }
}



xom-interest-bounces@lists.ibiblio.org wrote on 05/22/2003 12:35:39 PM:

> 
> Here is an example Element:
> 
> <rung>
> <cmt flags="0">This is a rung comment. It is optionally included as
> part of a rung</cmt>
> <!-- rung proper, the Text part: -->
> XIC I:0/0 OTE O:12
> </rung>
> 
> When getValue() is called on Element <rung>, it returns the text of the 
> nested <cmt> preceding the text of the <rung>.  XOM needs a method to 
> return only <rung>'s text:
> 
> "XIC I:0/0 OTE O:12"
> 
> 
> Please don't suggest that I change the grammar of my XML to stoop to 
> XOM's capabilities.  That would be _dangerous_   :)  to me.
> 
> Is there a capability in XOM that I don't see?
> 
> 
> 
> 
> _______________________________________________
> XOM-interest mailing list
> XOM-interest@lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic