public AddAll ( |
||
list | The |
|
Результат | void |
/// <summary> /// Evaluates a simple multiple valued path access from the given context /// node to the named grandchild elements. /// </summary> /// <param name="contexts">The context <see cref="XmlElement"/>.</param> /// <param name="name1">The name of the required child.</param> /// <param name="name2">The name of the required grandchild.</param> /// <returns>A possibly empty <see cref="XmlNodeList"/> of matching /// child elements.</returns> public static XmlNodeList Paths(XmlNodeList contexts, string name1, string name2) { MutableNodeList list = new MutableNodeList(); foreach (XmlElement context in contexts) { list.AddAll(Paths(Paths(context, name1), name2)); } return(list); }
/// <summary> /// Creates a (possibly empty) <see cref="XmlNodeList"/> containing all the /// element nodes identified by the given name strings. /// </summary> /// <param name="names">The name of the required elements.</param> /// <returns>A <see cref="XmlNodeList"/> of corresponding nodes.</returns> public XmlNodeList GetElementsByName(string [] names) { MutableNodeList list = new MutableNodeList(); foreach (string name in names) { if (elementsByName.ContainsKey(name)) { list.AddAll(elementsByName [name]); } } return(list); }
/// <summary> /// Creates a (possibly empty) <see cref="XmlNodeList"/> containing all the /// element nodes identified by the given name strings. /// </summary> /// <param name="names">The name of the required elements.</param> /// <returns>A <see cref="XmlNodeList"/> of corresponding nodes.</returns> public XmlNodeList GetElementsByName(string [] names) { MutableNodeList list = new MutableNodeList (); foreach (string name in names) { if (elementsByName.ContainsKey (name)) list.AddAll (elementsByName [name]); } return (list); }
/// <summary> /// Evaluates a simple multiple valued path access from the given context /// node to the named grandchild elements. /// </summary> /// <param name="contexts">The context <see cref="XmlElement"/>.</param> /// <param name="name1">The name of the required child.</param> /// <param name="name2">The name of the required grandchild.</param> /// <returns>A possibly empty <see cref="XmlNodeList"/> of matching /// child elements.</returns> public static XmlNodeList Paths(XmlNodeList contexts, string name1, string name2) { MutableNodeList list = new MutableNodeList (); foreach (XmlElement context in contexts) list.AddAll (Paths (Paths (context, name1), name2)); return (list); }