XML の変更点   

  • 追加された行はこの色です。
  • 削除された行はこの色です。
  • XML へ行く。

** perl で xml [#fe69a410]
 
 http://www.kawa.net/works/perl/treepp/treepp.html
#pre{{
#!/usr/bin/perl

$xmlfile = "test.xml";

use XML::TreePP;
use Data::Dumper;

$xml = XML::TreePP->new();
$tree = $xml->parsefile($xmlfile); 

print Dumper($tree);
#$xml->writefile("out.xml",$tree);

#$data = $xml->XMLout($data,KeepRoot=>1,OutputFile=>'out.xml');

}}

#pre{{
<urllist>
  <urlitem>
    <id>1</id>
    <title>yahoo</title>
    <url>http://weather.yahoo.co.jp/weather/jp/12/4510.html</url>
    <size>800,600</size>
    <offset>242,263</offset>
    <staytime>20</staytime>
    <starttime>12:00</starttime>
  </urlitem>
  <urlitem>
    <id>2</id>
    <title>yahoo</title>
    <url>http://weather.yahoo.co.jp/weather/jp/12/4510.html</url>
    <size>800,600</size>
    <offset>242,263</offset>
    <staytime>20</staytime>
    <starttime>12:00</starttime>
  </urlitem>
</urllist>

}}

#pre{{
<?xml version="1.0" encoding="UTF-8" ?>
<urllist><urlitem><id>1</id>
<offset>242,263</offset>
<size>800,600</size>
<starttime>12:00</starttime>
<staytime>20</staytime>
<title>yahoo</title>
<url>http://weather.yahoo.co.jp/weather/jp/12/4510.html</url>
</urlitem>
<urlitem><id>2</id>
<offset>242,263</offset>
<size>800,600</size>
<starttime>12:00</starttime>
<staytime>20</staytime>
<title>yahoo</title>
<url>http://weather.yahoo.co.jp/weather/jp/12/4510.html</url>
</urlitem>
</urllist>

}}