Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

checking valid data input using DOM/XMLBeans  RSS feed

 
ahsan mir
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following xml document(a fragment of it).I want to check the SampTop element i Insert is ,its value is greater than the last similar element (in the list).If it is it shall only then insert. Any idea on how to do it. I am using XMLBeans and/or DOM(JAXP). Has anyone tried data insertion to an xml doc with xmlbeans?
*******************************************************
<Information>

<Samp>
<sampTop>1.00</sampTop>
<sampRef>2</sampRef>
<sampType>B</sampType>
<sampBase>1.30</sampBase>

</Samp>

<Samp>
<sampTop>2.50</sampTop>
<sampRef>3</sampRef>
<sampType>B</sampType>
<sampBase>1.30</sampBase>
</Samp>
<Samp>
new sampTop and other elements
</Samp>
</Information>

**************************************************************************

Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!