【问题标题】:Query the XMl files using javascript or php使用 javascript 或 php 查询 XML 文件
【发布时间】:2014-05-09 16:48:03
【问题描述】:

这里有一个XML文件click here to see the XML file

我对此完全陌生,我想获得满足以下条件的属性:

  Where city=Toronto(present in address node) and price is > 13000 and BathroomTotal>2(present in Building node)

使用 php 或 javascript 可以快速查询如此庞大的文件。
如何获得我提到的条件的属性。

注意:更改我在where条件中给出的值,可以放任何城市名称或任何价格值

【问题讨论】:

    标签: javascript php xml xquery


    【解决方案1】:

    您可以使用 SimpleXML:www.php.net/manual/en/book.simplexml.php 或 PCRE(为了效率)

    【讨论】:

      【解决方案2】:

      如果您想查询客户端,XQuery 选项是XQuery in the Browser

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-01-20
        • 1970-01-01
        • 1970-01-01
        • 2013-08-18
        • 1970-01-01
        • 2012-07-26
        • 1970-01-01
        相关资源
        最近更新 更多