Parsing in groovy between two tags ?
Posted
by fabien-barbier
on Stack Overflow
See other posts from Stack Overflow
or by fabien-barbier
Published on 2010-05-06T21:28:40Z
Indexed on
2010/05/06
22:38 UTC
Read the original article
Hit count: 128
I would like to parse this Gstring with groovy :
Format type : CodeClass, Name, Accession, Count.
def txt = """ <Lane_Attributes>
ID,1
FovCount,600
FovCounted,598
...
</Lane_Attributes> """
And get a map like :
Map = [ID:1, FovCount:600, FovCounted:598]
How can I :
- extract text between tag and ?,
- and convert to a map ?
© Stack Overflow or respective owner