W
www
Hi,
I have a xml file, something like:
<?xml version="1.0" encoding="UTF-8"?>
<Series>
<header>
<type>accumulative</type>
<creationDate>2007-11-07</creationDate>
<creationTime>14:28:46</creationTime>
</header>
<event date="1985-09-01" flag="1" time="06:00:00" value="1.400"/>
<event date="1985-09-01" flag="1" time="12:00:00" value="2.500"/>
<event date="1985-09-01" flag="1" time="18:00:00" value="5.900"/>
<event date="1985-09-02" flag="1" time="00:00:00" value="3.000"/>
<Series>
Another xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Series>
<header>
<type>accumulative</type>
<creationDate>2007-11-07</creationDate>
<creationTime>14:28:46</creationTime>
</header>
<event date="1985-09-01" flag="1" time="06:00:00" value="1.500"/>
<event date="1985-09-01" flag="1" time="12:00:00" value="2.600"/>
<event date="1985-09-01" flag="1" time="18:00:00" value="5.950"/>
<event date="1985-09-02" flag="1" time="00:00:00" value="3.100"/>
<Series>
I hope to compare, between the two files, date, time and value(in JUnit
test). Hopefully, when comparing the values, I can set some error
tolerance. Is there a way to do it? I don't want to extract substring
from each line, because the exact locations(the index) can be different
in next run.
Thank you very much.
I have a xml file, something like:
<?xml version="1.0" encoding="UTF-8"?>
<Series>
<header>
<type>accumulative</type>
<creationDate>2007-11-07</creationDate>
<creationTime>14:28:46</creationTime>
</header>
<event date="1985-09-01" flag="1" time="06:00:00" value="1.400"/>
<event date="1985-09-01" flag="1" time="12:00:00" value="2.500"/>
<event date="1985-09-01" flag="1" time="18:00:00" value="5.900"/>
<event date="1985-09-02" flag="1" time="00:00:00" value="3.000"/>
<Series>
Another xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Series>
<header>
<type>accumulative</type>
<creationDate>2007-11-07</creationDate>
<creationTime>14:28:46</creationTime>
</header>
<event date="1985-09-01" flag="1" time="06:00:00" value="1.500"/>
<event date="1985-09-01" flag="1" time="12:00:00" value="2.600"/>
<event date="1985-09-01" flag="1" time="18:00:00" value="5.950"/>
<event date="1985-09-02" flag="1" time="00:00:00" value="3.100"/>
<Series>
I hope to compare, between the two files, date, time and value(in JUnit
test). Hopefully, when comparing the values, I can set some error
tolerance. Is there a way to do it? I don't want to extract substring
from each line, because the exact locations(the index) can be different
in next run.
Thank you very much.