LR几个常用函数

web_reg_save_param_ex():关联



web_get_int_property():可以使用该函数获取页面返回的一些东西,如状态码:200



web_custom_request("web_custom_request",

                       "URL=http://192.168.0.83:8080/message-center/ws/b2cSmsWebService",

                       "Method=POST",

                       "RecContentType=application/soap+xml;charset=utf-8",

                       "EncType=application/soap+xml;charset=utf-8",

                       "TargetFrame=",

                       "Resource=0",

                       "Referer=",                         

                       "Body={str}",

                       LAST);



//获取xml指定节点的值,



lr_xml_get_values("XML={Param_return}",

                      "ValueParam=temp",

                      "Query=/root/header/totalRecords",

                      LAST);



//xml返回多个相同节点名获取



int i, len;

    char *xml_input =

     "<employee>"

        "<name>Mike</name>"

        "<name>John</name>"

        "<name>Lie</name>"

     "</employee>";



      lr_save_string(xml_input, "XML_Input_Param");

      len = lr_xml_get_values("XML={XML_Input_Param}",

                        "ValueParam=Result",

                        "Query=/employee/name",

                        "SelectAll=Yes",

                        LAST);

    lr_output_message("the number is: %d",len);



    for (i = 1; i <= len; i ++) {

        lr_output_message(lr_paramarr_idx("Result", i));

    }

 

你可能感兴趣的:(常用函数)