zoukankan      html  css  js  c++  java
  • SPServices Document Library 查询某个文档

    使用jquery.SPServices查询文档库里的某一个文档,需要设置CAMLQueryOptions属性,<ViewAttributes Scope="RecursiveAll" />才能查询出来,取值的时候需要使用SPFilterNode("z:row")

            $().SPServices({
                operation: "GetListItems",
                async: false,
                listName: "Test Documents",
                CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID' /><Value Type='Counter'>" +strID+ "</Value></Eq></Where></Query>",
                CAMLQueryOptions:'<QueryOptions><ViewAttributes Scope="RecursiveAll" /></QueryOptions>',
                CAMLRowLimit: 1,
                CAMLViewFields: "<ViewFields><FieldRef Name='YourField' /><FieldRef Name='ID' /></ViewFields>",
                completefunc: function(xData, Status) {
                    $(xData.responseXML).SPFilterNode("z:row").each(function(i) {
                        if($(this).attr("ows_YourField")!='' && $(this).attr("ows_YourField") != null && $(this).attr("ows_YourField") != 'undefined'){
                            YourField = $(this).attr("ows_YourField");
                        }
                    });
                }
            });
  • 相关阅读:
    HBase性能调优
    HBase原理和设计
    HBase 架构脑图
    Hadoop
    Hadoop YARN架构设计要点
    Hadoop-YARN
    Hadoop-HDFS
    TCP传输
    分布式系统常见的事务处理机制
    Zookeeper Client简介
  • 原文地址:https://www.cnblogs.com/bmib/p/2514876.html
Copyright © 2011-2022 走看看