| Å×½ºÆ® :: XML :: XPath. Å×½ºÆ® :: XML :: XPath´Â XPath ¾î¼³ ¼ÇÀ» Å×½ºÆ®ÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Å×½ºÆ® :: XML :: XPath. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Dominic Mitchell
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~semantico/
Å×½ºÆ® :: XML :: XPath. ű×
Å×½ºÆ® :: XML :: XPath. ¼³¸í
Å×½ºÆ® :: XML :: XPath´Â XPath ¾î¼³ ¼ÇÀ» Å×½ºÆ®ÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. Å×½ºÆ® :: XML :: XPath´Â XPath Assertions¸¦ Å×½ºÆ®ÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù .Synopsis Å×½ºÆ® :: XML :: XPath Tests => 3; like_xpath ( '', '/ foo'); # pass sike_xpath ( '', '/ bar'); # faillish_xpath ( '', '/ bar'); # pass is_xpath ( 'bar', '/ foo', 'bar'); # pass is_xpath ( 'bar', '/ bar', 'foo'); # FAIL # XPATH ¾î¼³ ¼ÇÀÇ ´õ Èï¹Ì·Î¿î ¿¹Á¦. ³» $ xml = 'pub'; # ¼Ó¼ºÀ» Å×½ºÆ® ÇÒ ¼ö ÀÖ½À´Ï´Ù. like_xpath ($ xml, '/ foo ;); # pass # ¹®¼ÀÇ ¾Æ¹« °÷À̳ª ¿ä¼Ò¸¦ ã½À´Ï´Ù. like_xpath ($ xml, '// bosh'); # pass # µÑ ´Ù. like_xpath ($ xml, '// bosh '); # PasSthis ¸ðµâÀ» »ç¿ëÇϸé XPath ¹® Çü½ÄÀ¸·Î XML¿¡ ´ëÇÑ ¸í·É¹®À» assert ÇÒ ¼ö ÀÖ½À´Ï´Ù. XMLÀÇ Á¶°¢ÀÌ Æ¯Á¤ ű׸¦ Æ÷ÇÔ ÇؾßÇÏ´Â °æ¿ì, ±×·¸°Ô ¼Ó¼º µîÀ¸·Î ¾Ë ¼öÀÖ´Â ¼³Ä¡µÈ XPath ¸ðµâÀ» »ç¿ëÇÏ·Á°í ½ÃµµÇÕ´Ï´Ù. ÇöÀç xml :: libxml ¹× xml :: xpath, ±× order.nb : ÀϹÝÀûÀ¸·Î XPath 󸮿¡¼ ¹®ÀåÀÌ ÄÁÅؽºÆ® ³ëµå¿¡¼ ¹ß»ýÇÕ´Ï´Ù. like_xpath ()ÀÇ °æ¿ì, ÄÁÅؽºÆ® ³ëµå´Â Ç×»ó ·çÆ® ³ëµå°¡µË´Ï´Ù. ½ÇÁ¦·Î ÀÌ°ÍÀºÀÌ µÎ ¹®ÀÌ µ¿ÀÏÇÏ´Ù´Â °ÍÀ» ÀǹÌÇÕ´Ï´Ù. # Àý´ë °æ·Î. like_xpath ( '', '/ foo'); # root¿¡ ´ëÇÑ # °æ·Î. like_xpath ( ''foo '); »ç¹°À» °£´ÜÇÏ°Ô À¯ÁöÇϱâ À§ÇØ ¸ðµç °÷¿¡¼ Àý´ë °æ·Î¸¦ »ç¿ëÇÏ´Â °ÍÀÌ °¡Àå ÁÁ½À´Ï´Ù .NB : ¼Ó¼º ÁöÁ¤À» Á¶½ÉÇϽʽÿÀ. @ -signÀ» »ç¿ëÇϱ⠶§¹®¿¡ PerlÀº Å»ÃâÇÏÁö ¾Ê°Å³ª ÀÛÀº µû¿ÈÇ¥¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¸é ¹è¿À» º¸°£ÇÏ·Á´Â °Í¿¡ ´ëÇØ ºÒÆòÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
Å×½ºÆ® :: XML :: XPath. °ü·Ã ¼ÒÇÁÆ®¿þ¾î