YAXLib.StringUtils.CombineLocationAndElementName C# (CSharp) Method

CombineLocationAndElementName() public static method

Combines a location string and an element name to form a bigger location string.
public static CombineLocationAndElementName ( string location, System.Xml.Linq.XName elemName ) : string
location string The location string.
elemName System.Xml.Linq.XName Name of the element.
return string
        public static string CombineLocationAndElementName(string location, XName elemName)
        {
            return String.Format("{0}/{1}", location, elemName);
        }

Usage Example

Esempio n. 1
0
 /// <summary>
 ///     Creates and returns the XML element with the given name located in the
 ///     given location string in the given XML element.
 /// </summary>
 /// <param name="baseElement">The parent XML element.</param>
 /// <param name="location">The location string.</param>
 /// <param name="elemName">Name of the element to create.</param>
 /// <returns>
 ///     returns the XML element with the given name located in the
 ///     given location string in the given XML element
 /// </returns>
 public static XElement CreateElement(XElement baseElement, string location, XName elemName)
 {
     return(CreateLocation(baseElement, StringUtils.CombineLocationAndElementName(location, elemName)));
 }