Example #1
0
        public Header[] GetHeaders()
        {
            ElementList nl = SelectElements("header");
            var headers = new Header[nl.Count];

            int i = 0;
            foreach (Element e in nl)
            {
                headers[i] = (Header) e;
                i++;
            }
            return headers;
        }
Example #2
0
 /// <summary>
 ///   Adds a new Header
 /// </summary>
 /// <param name="name"> header name </param>
 /// <param name="val"> header value </param>
 /// <returns> returns the new added header </returns>
 public Header AddHeader(string name, string val)
 {
     var header = new Header(name, val);
     AddChild(header);
     return header;
 }
Example #3
0
 /// <summary>
 ///   Adds the given Header
 /// </summary>
 /// <param name="header"> </param>
 /// <returns> returns the given Header </returns>
 public Header AddHeader(Header header)
 {
     AddChild(header);
     return header;
 }
Example #4
0
 /// <summary>
 ///   Adds a new Header
 /// </summary>
 /// <returns> </returns>
 public Header AddHeader()
 {
     var h = new Header();
     AddChild(h);
     return h;
 }