Ejemplo n.º 1
0
        }     //end of AddSubNode.

        /// <summary>
        ///
        /// </summary>
        /// <param name="pNameArray"></param>
        public void AddMultiLayerSubNode(string[] pNameArray)
        {
            XPathNode oParentNode = this;

            for (int i = 0; i < pNameArray.Length; i++)
            {
                XPathNode oChildNode = new XPathNode(pNameArray[i]);
                oParentNode.AddSubNode(oChildNode);
                oParentNode = oChildNode;
            } //end of for.
        }     //end of AddMultiLayerSubNode.
Ejemplo n.º 2
0
        }//end of constructor.

        /// <summary>
        /// 取得兩層標簽結構的物件
        /// </summary>
        /// <param name="Layer1Name">第一層標簽字串</param>
        /// <param name="Layer2Name">第二層標簽字串</param>
        /// <returns>XPathNode 物件</returns>
        public static XPathNode CreateEntity(string Layer1Name, string Layer2Name)
        {
            try
            {
                XPathNode oXPathNode = new XPathNode(Layer1Name);
                oXPathNode.AddSubNode(new XPathNode(Layer2Name));
                return(oXPathNode);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }//end of GetEntity.