示例#1
0
        /// <summary>
        /// Gets a child element
        /// </summary>
        /// <param name="elementLabel">The child elements label</param>
        /// <returns>The element or null if nothing is found</returns>
        public HbmlElement GetChildElement(string elementLabel)
        {
            HbmlElement element = null;

            GetItemFromDictionary(_elementChildren, elementLabel, out element);
            return(element);
        }
示例#2
0
        /// <summary>
        /// Add a plain element with just a label and value
        /// </summary>
        /// <param name="elementLabel">The unique element label to add</param>
        /// <param name="elementValue">The element value</param>
        /// <returns>True if the element was added</returns>
        public bool AddElement(string elementLabel, string elementValue)
        {
            HbmlElement newElement = new HbmlElement()
            {
                Label = elementLabel,
                Value = elementValue
            };

            return(AddElement(newElement));
        }
示例#3
0
 /// <summary>
 /// Adds a HbmlElement object to this element
 /// </summary>
 /// <param name="element">The element to add</param>
 /// <returns>True if the element was successfully added</returns>
 public bool AddElement(HbmlElement element)
 {
     return(AddItemToDictionary(_elementChildren, element.Label, element));
 }