XML :: Simple :: Tree.

XML :: Simple :: Tree´Â XML :: Simple Data StructuresÀÇ Æ®¸® ¿ÀºêÁ§Æ® È®ÀåÀÚÀÔ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

XML :: Simple :: Tree. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Aaron Dancygier
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~aakd/XML-Simple-Tree-0.03/lib/XML/Simple/Tree.pm

XML :: Simple :: Tree. ű×


XML :: Simple :: Tree. ¼³¸í

XML :: Simple :: Tree´Â XML :: Simple Data StructuresÀÇ Æ®¸® ¿ÀºêÁ§Æ® È®ÀåÀÚÀÔ´Ï´Ù. XML :: °£´ÜÇÑ :: Æ®¸® XML :: °£´ÜÇÑ µ¥ÀÌÅÍ structures.SYNOPSIS ## ½ºÅ©¸³Æ® 1 Àü¼ø Åë°ú ## ¸¸µé°í XMLÀ» XML :: :: °£´ÜÇÑ Æ®¸® °´Ã¼¸¦ »ý¼º ÇÒ ##ÀÇ Æ®¸® °´Ã¼ È®Àå :: °£´ÜÇÑ :: XML ¹®¼­ÀÇ Æ®¸® ¿ÀºêÁ§Æ® ($ xml_file) My $ xml_obj = xml :: Simple :: tree-> new (file => directory.xml ', node_key =>'dir ', target_key =>'name)); ## SUB SET_DO_NODE () ¸Þ¼­µå´Â ÇöÀç ³ëµå¿¡¼­ ½ÇÇàµÇµµ·Ï ¼­ºê ·çƾ ÂüÁ¶ (ÇÏÀ§ {MY $ self = $ xml_obj; my $ cnode = $ self-> get_cnode (); ³» $ ·¹º§ = $ self- > get_level (); my $ padding = '*'x ($ level + 1); "$ Padding $ cnode -> {name} n";}); ## SUB SET_DO_LEAF () ¸Þ¼­µå´Â ¸®ÇÁ ³ëµå¿¡¼­ ½ÇÇàµÇµµ·Ï ¼­ºê ·çƾ ÂüÁ¶¸¦ ÃëÇÕ´Ï´Ù. $ XML_OBJ-> SET_DO_LEAF (ÇÏÀ§ {MY $ self = $ xml_obj; Àμâ "n";}); ## °¢ ³ëµå¿¡¼­ do_node () ¹× do_leaf ()¿¡¼­ DO_NODE ()¸¦ ½ÇÇàÇÏ´Â Æ®¸® »çÀü ÁÖ¹® TRAVERAL ¸Þ¼Òµå $ XML_OBJ-> Æ®·¡¹ö½º (); ## ½ºÅ©¸³Æ® 2 ## ³ëµå¸¦ ã¾Æ ¸Å°³ º¯¼ö¸¦ °Ë»öÇÕ´Ï´Ù. MY $ XML_OBJ = XML :: SIMPLE :: TRAS-> NEW (file => $ xml_file, node_key => 'µð·ºÅ丮', target_key => 'name'); $ want_node = $ xmlobj-> find_node ($ target_directory); MY $ mtime = $ want_node -> {mtime} ; ## ½ºÅ©¸³Æ® 3 ## ³ëµå¸¦ ã¾Æ¼­ Æ®¸®¿¡¼­ À߶ó³À´Ï´Ù (Á¦°Å). ³» $ cut_name = 'bin'; my $ mainxml = xml :: simple :: tree-> new (file => $ xml_file, node_key => 'µð·ºÅ丮', target_key => 'name'); $ mainxml-> cut_node ($ cut_name); ## ½ºÅ©¸³Æ® 4 ## XML :: Simple :: Tree °´Ã¼¸¦ »ç¿ëÇÏ¿© ´Ù¸¥ ##ÀÇ ´ë»ó ³ëµå¿¡ ºÙ¿© ³Ö±â XML·Î ´Ù½Ã º¯È¯ My $ target_dir = 'xxx'; ³» $ cut_tree = xml :: simple :: tree-> new (file => $ cut_xml_file, node_key => 'directory', target_key => 'name)); $ config_tree-> paste_node ($ target_dir, $ cut_tree-> get_cnode () -> {µð·ºÅ丮} ); ## XML·Î º¯È¯ MY $ XML = $ config_tree-> toxml (); ## Ãß°¡ ¿¹Á¦´Â Æ÷ÇÔ µÈ Å×½ºÆ®¿¡¼­ ãÀ» ¼ö ÀÖ½À´Ï´Ù.ÀÌ ¸ðµâÀº XML :: Simple :: Xmlin ($ xml_file, forceray => 1)¿¡ ÀÇÇØ ¹Ýȯ µÈ µ¥ÀÌÅÍ ±¸Á¶¸¦ °¡Á® ¿Í¼­ XML :: ´Ü¼øÀ» È®Àå ÇÒ ¼ö ÀÖ½À´Ï´Ù. ³ª¹« Á¶ÀÛ ¹× Ž»ö ¹æ¹ý. ¾Ë¾Æ µÎ´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù.ÀÌ ¿É¼ÇÀº Çϳª»ÓÀÔ´Ï´Ù. ¡Ü ·ç±Û·¡¸àÆ® : ¡¤ Perl ¿ä±¸ »çÇ× : ¡¤ Perl ¿ä±¸ »çÇ× : ¡¤ Perl.


XML :: Simple :: Tree. °ü·Ã ¼ÒÇÁÆ®¿þ¾î

jcomet.

JCONETÀº Àç·Îµå °¡´ÉÇÏ°í µ¿Àû ±¸¼º °´Ã¼ ¼¼Æ®¸¦ Á¦°øÇÏ´Â °ÍÀ» ¸ñÇ¥·ÎÇÏ´Â ¿ÀÇ ¼Ò½º ÇÁ·ÎÁ§Æ®ÀÔ´Ï´Ù. ...

126

´Ù¿î·Îµå