zoukankan      html  css  js  c++  java
  • XPath – Study Notes

    /catalog/cd/price   -- get price elements under catelog/cd

    //cd  -- get all cd elements of file

    /catalog/cd/* -- get all elements under cd

    /catalog/*/price

    /*/*/price

    //*  -- get all elements of file

    --Get elements

    /catalog/cd[0] -- get the first element which name is cd under catalog

    /catalog/cd[last()] -- get the last element

    /catelog/cd[price] -- get all cd elements which contain price child element

    /catalog/cd[price=10.90] -- get all cd elements which contain price child element and value is 10.90

    /catalog/cd[price-10.90]/price -- get all price elements which cd contain price child element and value is 10.90

    --Get more than one path

    /catalog/cd/title | catalog/cd/artist

    //title | //artist

    //title | //artist | //price

    --Choose attribute

    //@country  --choose all country attribute

    //cd[@country] -- choose all cd elements contain country attribute

    //cd[@*] -- choose all cd elements contain attribute

    //cd[@country="UK"] -- choose all cd elements contain attribute and value is UK

    //cd[@country="UK"][@name="test"] -- choose all cd elements contain country & name attributes and values are UK & test

    路慢慢其休远羲,吾将上下而求所
  • 相关阅读:
    yuv文件并行解析播放
    视频解析
    有意思的并查集讲解 收藏
    C++输入输出重载
    python 同步IO
    多线程与多进程的理解
    centos7 配置redis
    linux中的raid
    form表单系列中文件上传及预览
    centos7 安装swftools Apache_OpenOffice
  • 原文地址:https://www.cnblogs.com/garinzhang/p/2550024.html
Copyright © 2011-2022 走看看