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;
            }
        }

  • 相关阅读:
    websword-update-notification
    SQL Server2005+、MySQL、Oracle 数据库字典生成工具
    fullcalendar小结
    Oracle 表空间查询
    Oracle正则表达式
    深度学习高性能集群(HPC)提交作业总结
    读《Oracle DBA工作笔记》知识点-获取创建语句
    discuz x3.1 整站搬家换域名攻略
    读《Oracle PLSQL 程序设计第五版》创建包规范和包体
    pls-00329非法引用表结构
  • 原文地址:https://www.cnblogs.com/IsNull/p/1804115.html
Copyright © 2011-2022 走看看