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

  • 相关阅读:
    【交互稿】sample
    【公开数据】网站
    【交互】规范
    【Flask】https
    【Flask】run with ssl /https
    需求模版
    低功耗蓝牙BLE外围模式(peripheral)-使用BLE作为服务端
    AIDL示例
    Android使用BLE(低功耗蓝牙,Bluetooth Low Energy)
    Android网络访问库
  • 原文地址:https://www.cnblogs.com/IsNull/p/1804115.html
Copyright © 2011-2022 走看看