Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃPERL ½âÎöxmlÎļþʱÓöµ½µÄÒ»¸öÎÊÌâ

ÎÒÔÚ×¼±¸ÓÃPerl½âÎöÒ»¸öxmlÎļþʱ,³ÌÐòÒ»ÔËÐоͱ¨Ò»¸ö´í:
Couldn't open encmap gb2312.enc:
No such file or directory
 at C:/Perl/lib/XML/Parser.pm line 187

ÆäÖÐÎÒÓõ½µÄ°üÊÇXML::Simple.
ÏàÓ¦µÄ´úÂëÊÇ:

my $file =qq(1.xml);
my $xml =XMLin($file);

print $xml;

ÇëÎʸßÊÖÃÇ,ÕâÊÇʲôÎÊÌâµ¼ÖµÄ?Ó¦¸ÃÔõôȥ½â¾ö?лл.


Äã¼ì²éÒ»ÏÂÄãÒª½âÎöµÄxmlÎļþÊÇ·ñ¿ÉÒÔͨ¹ýÄã´«ÈëµÄ²ÎÊý¶ø·ÃÎʵ½.

ͨ¹ý²ÎÊý´«ÈëÒ²±¨Í¬ÑùµÄ´íÎó.

Perl code:
use strict;
use warnings;
use XML::Simple;

my $xml=XMLin('test.xml');

use Data::Dumper;
print Dumper($xml);



E:\temp> perl   test.pl
$VAR1   =   {
    'debugfile '   =>   '/tmp/foo.debug ',
    'server '   =>   {
            'kalahari '   =>   {
                        'osversion '   =>   '2.0.34 ',
                        'osname '   =>   'linux ',
                   


Ïà¹ØÎÊ´ð£º

ÈçºÎÌá½»xmlÀàÐÍÊý¾Ý - .NET¼¼Êõ / ASP.NET

Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......

ÈçºÎÓÃASP¶ÁÈ¡ XML - Web ¿ª·¢ / ASP

<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......

ÔÚÕâÑùÒ»¸öxmlÎļþÀïÈçºÎÑ¡ÔñÌصã½Úµã

<?xml version="1.0" encoding="UTF-8" ?> 
<root> 
<video> 
  <device deviceid="\\?\usb#vid_0c45&pid_613b#5&2d0620de& ......

wince³ÌÐòÔõô°ÑXMLÎļþ´«Èëwebservice

ÎÒÔÚ±àдһ¸öwince5.0µÄ³ÌÐò£¬ÏëʵÏÖ°ÑPDAÉϵÄÒ»¸öLIST <STRING>ÀàÐ͵ÄÊý¾ÝÐòÁл¯ÎªXML£¬È»ºóÔÚPCÉϵÄÒ»¸öwebserviceÄõ½Õâ¸öXML£¬×ª»¯ÎªDataset£¬¸üÐÂPCÉϵÄÊý¾Ý¿â£¬ÎÒÏëÎÊÔõô°ÑXML´«¸øwebserviceµÄÄØ£¿
......

¸ù¾Ý½ÚµãÃû³ÆÑ­»·É¾³ýxml½Úµã.txt - .NET¼¼Êõ / C#

ÄÚÈÝÈçÌâ¡£¡£ÔÚC#Àï¸ÄÈçºÎдÄØ£¿
±¾À´Ë¼Â·ÊÇÏȱȶԽڵãÃû³Æ£¬ÈçÊǵĻ°¾Í±£´æҪɾ³ý½ÚµãµÄϱê·ÅÔÚÊý×éÀȻºóÑ­»·É¾³ý£¬µ«·¢ÏÖ¡£¡£µ±ÎÒɾ³ýµÚÒ»¸öºó£¬ËùÓнڵãϱêÊýÁ¿¶¼·¢Éú¸Ä±ä¡£¡£
¾Í²»ÄÜÔÙ°´ÕÕ֮ǰ¼Í¼µÄ½Úµã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ