我有一个采用以下格式的大XML文件,我需要将此文件转换为MySQL表。请让我知道我该怎么做?
~~~~~~~~~~~
<host starttime="1392325468" endtime="1392325486"><status state="up" reason="user-set"/>
<address addr="192.168.0.2" addrtype="ipv4"/>
<hostnames>
</hostnames>
<ports><extraports state="filtered" count="2">
<extrareasons reason="no-responses" count="2"/>
</extraports>
<port protocol="udp" portid="22"><state state="open|filtered" reason="no-response" reason_ttl="0"/><service name="ssh" method="table" conf="3"/></port>
<port protocol="udp" portid="123"><state state="open|filtered" reason="no-response" reason_ttl="0"/><service name="ntp" method="table" conf="3"/></port>
</ports>
</host>
~~~~~~~~~~~