Example #1
0
        public string GetXpathName(XObject node, IDictionary <string, string> namespacePrefixes)
        {
            var    xAttr = (XAttribute)node;
            string preffix;

            namespacePrefixes.TryGetValue(xAttr.Name.NamespaceName, out preffix);

            return("@" + XpathExtension.BuildXpathName(preffix,
                                                       xAttr.Name.LocalName));
        }
Example #2
0
        public string GetXpathName(XObject node, IDictionary <string, string> namespacePrefixes)
        {
            var    xElem = (XElement)node;
            string preffix;

            namespacePrefixes.TryGetValue(xElem.Name.NamespaceName, out preffix);

            return(XpathExtension.BuildXpathName(preffix,
                                                 xElem.Name.LocalName,
                                                 xElem.GetCardinality()));
        }