Beispiel #1
0
        private static string _XPathConcatText(XXElement xxelement, string xpath, string separator, bool xplicit, Func <string, string> resultFunc = null, Func <string, string> itemFunc = null)
        {
            string   value    = null;
            XElement xelement = xxelement.XElement;

            if (xelement != null)
            {
                object o = xelement.XPathEvaluate(xpath);
                if (XPathResultConcatText(o, out value, separator, resultFunc, itemFunc))
                {
                    XXElement.WriteLine(2, "get value \"{0}\" from element \"{1}\" (\"{2}\")", xpath, xxelement.XPath, value);
                }
                else if (xplicit)
                {
                    XXElement.WriteLine(1, "error value not found \"{0}\" from element \"{1}\"", xpath, xxelement.XPath);
                }
            }
            else if (xplicit)
            {
                XXElement.WriteLine(1, "error value not found \"{0}\" from null element \"{1}\"", xpath, xxelement.XPath);
            }
            return(value);
        }