xml editing
Posted: Fri Jan 16, 2009 11:51 pm
Hello all..
I have an xml file of the format :
There is another file which i got
My problem is how do i replace the parameters of the respective annotation in first page to the annotations in the second xml file.?
I have an xml file of the format :
Code: Select all
<?xml version="1.0"?>
<annotations>
<annotation id="3" type="HOTSPOT">
<time>
<starttime>7000</starttime>
<endtime>15000 </endtime>
</time>
<params>
<x>100</x>
<y>100</y>
<width>50</width>
<height>100</height>
<text>Sample HotSpot</text>
</params>
</annotation>
<annotation id="4" type="HOTSPOT">
<time>
<starttime>12000</starttime>
<endtime>14000 </endtime>
</time>
<params>
<x>220</x>
<y>70</y>
<width>50</width>
<height>80</height>
<text>Sample HotSpot</text>
</params>
</annotation>
<annotation id="1" type="NOTE">
<time>
<starttime>13000</starttime>
<endtime>25000</endtime>
</time>
<params>
<x>170</x>
<y>160</y>
<width>100</width>
<height>40</height>
<text>Sample Note using xml</text>
</params>
</annotation>
<annotation id="2" type="SPEECHBUBBLE">
<time>
<starttime>4000</starttime>
<endtime> 6000</endtime>
</time>
<params>
<x>20</x>
<y>40</y>
<width>100</width>
<height>60</height>
<text>Sample speech bubble using xml</text>
<px>180</px>
<py>80</py>
</params>
</annotation>
<annotation id="0" type="PAUSE">
<time>
<starttime>8000</starttime>
<endtime>8000</endtime>
<pausetime>10000</pausetime>
</time>
<params>
<x>20</x>
<y>40</y>
<width>100</width>
<height>60</height>
</params>
</annotation>
</annotations>
Code: Select all
<document>
<requestHeader video_id="xyz" />
<updateitems>
<annotation id="3" type="HOTSPOT">
<time>
<starttime>7000</starttime>
<endtime>15000 </endtime>
</time>
<params>
<x>150</x>
<y>125</y>
<width>30</width>
<height>10</height>
<text>Sample HotSpot</text>
</params>
</annotation>
</updateitems>
</document>