zoukankan      html  css  js  c++  java
  • 两个常用的Infopath Service读取域值的函数

    //设置域值 

       public static string NavSetValue(XPathNavigator xn, string strXPath,XmlNamespaceManager xnm,string strValue)
        {
            try
            {
                if (xn != null)
                {
                    xn.SelectSingleNode(strXPath, xnm).SetValue(strValue);
                    return xn.Value;
                }
                else
                {
                    return "";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }

      

    //读域值   

     public static string GetInnerXML(XPathNavigator xMain, XmlNamespaceManager xnm, string strXPath)
        {
            try
            {
                if (xMain != null)
                {
                    System.Xml.XmlNamespaceManager xNameSpace = new System.Xml.XmlNamespaceManager(new System.Xml.NameTable());
                    xNameSpace.AddNamespace("my", xnm.LookupNamespace("my").ToString());
                    System.Xml.XPath.XPathNavigator FieldNavn = xMain.SelectSingleNode(strXPath, xNameSpace);

                    return FieldNavn.InnerXml;
                }
                else
                {
                    return "";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

  • 相关阅读:
    db2缓冲池调优
    linux下安装rpm出现error: Failed dependencies
    linux下挂载磁盘
    db2 常见错误以及解决方案[ErrorCode SQLState]
    db2数据库表操作错误SQL0668N Operation not allowed for reason code "1" on table "表". SQLSTATE=57016的解决方法
    db2用户权限赋值
    db2查看当前用户模式及当前用户的权限
    loadrunner常用函数整理
    书上的脚本案例
    hdu 1711---KMP
  • 原文地址:https://www.cnblogs.com/IsNull/p/1804115.html
Copyright © 2011-2022 走看看