XML Parser °²×°ÎÊÌâ1
¹ØÓÚ°²×°multiget³öÏÖXML::Parser perl module is required for intltool´íÎóÎÊÌâµÄ½â¾ö ÊÕ²Ø
ÔÚ°²×°Multiget£¬ÔÚconfigureµÄʱºòÌáʾXML::Parser perl module is required for intltool´íÎó¡£¾ßÌå½â¾öµÄ·½·¨ÈçÏ£º #perl -MCPAN -e shell Ö®ºó¸ú¾ÝÌáʾһ²½²½ÍùÏ£¬ÅäÖÃÍêºó»á³öÏÖÒ»¸ö >µÄÃüÁîÌáʾ >install XML::Parser µÈ´ýËüÍê³É°²×°£¬ÖØÐÂconfigure ¾ÍOKÁ˲»ÖªµÀÕâ¾äÊÇ×öʲôÓÃperl -e "require XML::Parser" ÔÚLINUX°²×°Èí¼þÎÞ·¨±àÒë°²×°µÄʱºò£¬ºÜ¶àÔÒò¶¼ÊÇÒòΪȱÉÙÁËÏà¹ØµÄÎļþ£¬Ö»Òª±ü³ÐÒ»¸ö“ȱɶ²¹É¶”ÔÔò£¬Ó¦¸ÃºÜÈÝÒ×½â¾öÎÊÌâµÄ¡£ÏÖÔÚȱÉÙµÄÊÇXML-Parser£¬ÄǾͰ²×°Õâ¸ö¶«¶«£¬ÔÚ¹Ù·½ÕÒµ½ÁËÕâ¸öÔ´Âë°ü¡£XML-Parser-2.34.tar.gz ÏÂÔØ£¬°²×°µÄʱºòÇë²é¿´READMEÎļþ£¬ÀïÃæÓÐÏêϸµÄ°²×°²½Ö裬°²×°Èí¼þµÄʱºòÒ»¶¨Òª¼ÇµÃÏÈÔĶÁREADER¡¢INSTALLÖ®ÀàµÄÎļþ£¬Ö÷ÒªÒ²¾Í¼¸²½£ºÏÂÔØµØÖ·http://cpan.perl.org/authors/id/M/MS/MSERGEANT/XML-Parser-2.34.tar.gz [marco.chan@Fedora7 XML-Parser-2.34]$ perl Makefile.PL £¨±àÒë¹ý³Ì£© [marco.chan@Fedora7 XML-Parser-2.34]$ make [marco.chan@Fedora7 XML-Parser-2.34]$ make test (ÕâÒ»²½·Ç±ØÐëµÄ) [marco.chan@Fedora7 XML-Parser-2.34]$make install
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/sdlcgxcqx/archive/2009/02/11/3878017.aspx
Ïà¹ØÎĵµ£º
ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<name>¹þÀï²¨Ì ......
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëÆ½Ì¨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐѰÕÒÌØ¶¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶øDO ......
£¨µÚ1Õ£©
(P1~3)1£®ÓÃ×Ô¼ºµÄÓïÑÔ¶ÔSGML¡¢HTMLºÍXML×÷¼òµ¥½éÉܺͶԱȡ£
SGML ÊÇÒ»ÖÖ²ÉÓñê¼ÇÀ´ÃèÊöÎĵµÊý¾ÝµÄͨÓÃÓïÑÔ£¬SGML¶¨ÒåÁË»ù±¾µÄÓï·¨ºÃ£¬Í¬Ê±Ò²ÔÊÐíÓû§½¨Á¢×Ô¼ºµÄÔªËØ±ê¼Ç¡£
HTML ²ÉÓÃÁ˺ÜСһ²¿·ÖSGMLµÄ±ê¼Ç£¬Í¬Ê±HTML²ÉÓõÄÊǹ̶¨±ê¼ÇÒ²²»ÐèÒª°üº¬DTD¡£
XML ͬHTMLÒ»Ñù£¬¶¼Êdzö×ÔÓÚSGML±ê׼ͨÓñê¼ÇÓï ......
CollectionÖ÷ÒªÊÇÖ¸ÏñArray, ArrayList, List, Dictionary, HashTableÕâЩÊý¾ÝÀàÐÍ£¬´ó¼ÒƽʱÓõĺܶࡣÈç¹ûÒ»¸öÀàÖÐÓÐÒ»¸öCollectionÀàÐ͵ijÉÔ±£¬ÔÚ¶ÔÕâ¸öÀà½øÐÐXMLÐòÁл¯µÄʱºò£¬Ó¦¸ÃÈçºÎ´¦Àí£¿Ó¦¸Ã˵ÔÚ.netµ±ÖÐÕâÊDZȽϼòµ¥µÄ£¬Ö»Òª½¨Á¢Ò»¸öXmlSerializerÀà¾Í¿ÉÒÔ°ïÄã×Ô¶¯¸ã¶¨£¬²»¹ýÓеÄʱºòÄã¿ÉÄÜÐèÒª¶Ô×Ô¶¯µÄÐòÁл¯¹ý³ ......
//xmlÎĵµÄÚÈÝ
<?xml version = "1.0" encoding="gb2312" standalone="yes"?>
<VFPData>
<company>
<companyno>100</companyno>
<companyname>ÉϺ£</companyname>
<ceoname>³ÂËÄ</ceoname>
<ceoma ......