I have an xml file with the structure:
<tag1>
<value1>xyx</value1>
<value2>123</value2>
</tag1>
<tag1>
<value1>568</value1>
<value2>zzzzz</value2>
</tag1>
where I want to parse each data pair in the this single file, so something like:
find first tag1 data pair
xmlstarlet can get the data (I have this working)
put that data in a database (I have this working)
go to next tag1 data pair
I don't know if I can make an awk loop with a FS of <>, or just use something like:
awk '/tag1/, /\/tag1/' sample.xml
which works for an individual data pair, but I just don't know how to build the right loop.