Exemple #1
0
        internal LdmlNode ResolveRootNode(string name)
        {
            LdmlNode node;

            if (!_nodes.TryGetValue(name, out node) && _parent != null)
            {
                return(_parent.ResolveRootNode(name));
            }
            return(node);
        }
Exemple #2
0
        internal LdmlNode SelectNode(LdmlDocument document)
        {
            if (Level != 0 || _entries.Length == 0 || _entries[0].Attributes.Length != 0)
            {
                return(null);
            }
            LdmlNode root = document.ResolveRootNode(_entries[0].Name);

            for (int i = 1; root != null && i < _entries.Length; i++)
            {
                root = root.SelectNode(_entries[i].Name, _entries[i].Attributes);
            }
            return(root);
        }