public override bool SameNode(LdmlNode other) { LdmlTypeUnitNode nd = other as LdmlTypeUnitNode; return(nd != null && nd.Name == Name && nd._unit == _unit); }
public override bool SameNode(LdmlNode other) { LdmlTypeLengthNode nd = other as LdmlTypeLengthNode; return(nd != null && nd.Name == Name && nd._length == _length); }
internal static LdmlNode Select(this LdmlNode root, params string[] entries) { for (int i = 0; root != null && i < entries.Length; i++) { root = root.Select(entries[i]); } return(root); }
public static string GetText(this LdmlNode root) { if (root != null) { return(root.Value ?? ""); } return(""); }
internal static LdmlNode Select(this LdmlNode root, params NodePathEntry[] entries) { for (int i = 0; root != null && i < entries.Length; i++) { root = root.Select(entries[i].Name, entries[i].Attributes); } return(root); }
internal LdmlNode ResolveNode(LdmlNode root) { for (int i = Level; root != null && i > 0; i--) { root = root.Parent; } for (int i = 0; root != null && i < _entries.Length; i++) { root = root.ResolveNode(_entries[i].Name, _entries[i].Attributes); } return(root); }
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); }
internal static LdmlNode SelectNode(this LdmlNode root, string name, LdmlAttributeValue[] filter = null) { if (root != null) { foreach (LdmlNode node in root.Children) { if (node.Name == name && node.HasAttributes(filter)) { return(node); } } } return(null); }
internal static LdmlNode Select(this LdmlNode root, string name, string filter, LdmlAttribute tp) { if (root != null) { foreach (LdmlNode node in root.Children) { if (node.Name == name && node.GetAttribute(tp) == filter) { return(node); } } } return(null); }
internal static LdmlNode Select(this LdmlNode root, string name) { if (root != null) { foreach (LdmlNode node in root.Children) { if (node.Name == name) { return(node); } } } return(null); }
internal static LdmlNode Select(this LdmlNode root, string name1, string name2) { return(root.Select(name1).Select(name2)); }