0

I have this xml:

<Root>
  <BTS processid="28" processdesc="בחירת שמאי / מוסך" statusdesc="TEST1"
    statusid="1099" requesteventts="2013-03-20 11:39:23.053120">
    <btsstatusconv AgentsStatusDesc="TEST2" />
  </BTS>
  <BTS processid="28" processdesc="בחירת שמאי / מוסך" statusdesc="TEST3"
    statusid="2001" requesteventts="2013-03-20 11:39:50.362384">
    <btsstatusconv AgentsStatusDesc="TEST4" />
  </BTS>
</Root>

what i need is:

  1. take each "BTS" tag.
  2. check the current "BTS" tag, "btsstatusconv" tag AgentsStatusDesc attribute.
  3. Change the current "BTS" statusdesc attirbute according to step 2 check.

How can i loop through each "BTS" tag checking its inner "btsstatusconv" tag "AgentsStatusDesc" attribute and act by the result?

I know how to go iver the BTS tags but having trouble getting the "btsstatusconv" tag inside it.

Thanks.

Michael A
  • 5,770
  • 16
  • 75
  • 127
  • These might help you!! http://stackoverflow.com/questions/484995/java-dom-get-the-xml-content-of-a-node?rq=1 http://stackoverflow.com/questions/773012/getting-xml-node-text-value-with-java-dom?rq=1 http://stackoverflow.com/questions/5610786/how-to-get-node-node-values-from-xml-in-java?rq=1 – Sharadh Deshpande May 12 '13 at 12:46
  • btsstatusconv is a child of BTS so each time you have a BTS element, get its btsstatusconv child and (presumably) then check its AgentsStatusDesc attribute. The precise syntax will depend on the DOM you are using. – peter.murray.rust May 12 '13 at 14:50

0 Answers0