ÕýÔò±í´ïʽȥ³ý<xml>±êÇ©ÖеÄÄÚÈÝ
<xml>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:View>Normal </w:View>
<w:Zoom>0 </w:Zoom>
<w:SaveIfXMLInvalid>false </w:SaveIfXMLInvalid>
a;ldisfjas;dkfjas;kfjas;klfja;lkfja;sdfjas;dkfjaskfjas;dkfjas;dfjasd;lkfjasd;lkjf
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
</xml>
¸ñʽ´óÖ¾ÍÊÇÕâÑùµÄ£¬¾ÍÊÇɾ³ý <xml>±êÇ©ÖеÄËùÓС£
ллÁË¡£
ÖÁÉÙÓÐ6¡¢7ÖÖ²»Í¬µÄÕýÔò±í´ïʽ£¬ÄãÒªÄÄÖÖ£¿
sed 's/ <[^>]*>//g'
cat test.txt | sed '/ <[\/]\{0,1\}xml>/!s/.*//' > tmp.xml
ÇëÎÊLS£¬ÔõôÓÃÉúÔò±í´ïʽ±íʾÒÔ{¿ªÊ¼£¬ÒÔ}½áÊøµÄÐа¡
vim --> :v/xml/d ÊÇÕÒµ½·Çpattern,ɾ֮
{{
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
HTML code:
<div id="tessx">
<ALEXA VER="0.9" URL="163.com/" HOME="0" AID="=">
<RLS PREFIX="http://" more="79" ......
ºÃ ÎÒÏëѧϰXMLºÃÊ飬ÇëÎÊÓÐʲôÊ飬¿ÉÒÔÉîÈëµÄѧϰÏÂµÄ Ð»Ð»
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢
XMLÈëÞµä
ÓÑÇé °ï¶¥¡£
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢ÖªÊ¶µã±È½ÏÉÙ
XML´ÓÈëÃŵ½¾«Í¨
......
½ñÌìÓöµ½Ò»¸öÎÊÌ⣬°ÑxmlÖеÄÖµ×°µ½.txt¸ñʽµÄÎļþÖС£
ÎÒĿǰÏëµ½Á½ÖֱȽϱ¿µÄ·½·¨£º1.¿ÉÒÔͨ¹ýxmlspy±à¼¹¤¾ßʵÏÖ
2.ͨ¹ý°Ñxmlת³ÉJavabean£¬È»ºóתµ½excelÖУ¬ÔÙ´Óб£´æÖØÃüÃûΪ. ......
ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐбȽÏ
ÀýÈ磺
<?xml version='1.0' encoding='utf-8'?>
<TestLIST>
<PID>40</PID>
<TestName>ÉîÛÚÊÐ</TestName>
......