Example #1
0
 /// <summary>
 /// Constructor for an element to be found anywhere inside the byte array.
 /// </summary>
 public ElementBounds(byte[] xmlBytes, ElementTags tags)
 {
     m_xmlBytes     = xmlBytes;
     m_tags         = tags;
     BeginTagOffset = xmlBytes.IndexOfSubArray(tags.BeginTag);
     if (BeginTagOffset >= 0)
     {
         EndOfStartTag = xmlBytes.IndexOfSubArray(s_endXmlTag, BeginTagOffset);
         EndTagOffset  = xmlBytes.IndexOfSubArray(tags.EndTag, BeginTagOffset + tags.BeginTag.Length);
     }
     else
     {
         EndOfStartTag = -1;
         EndTagOffset  = -1;
     }
     SetLength(tags.EndTag.Length);
 }
Example #2
0
 /// <summary>
 /// Constructor for an element to be found inside another element that was previously
 /// located in the byte array.
 /// </summary>
 public ElementBounds(byte[] xmlBytes, ElementTags tags, ElementBounds bounds)
 {
     m_xmlBytes = xmlBytes;
     m_tags     = tags;
     Reset(bounds.BeginTagOffset, bounds.EndTagOffset);
 }
Example #3
0
 public ElementBounds(byte[] xmlBytes, ElementTags tags, int ichMin, int ichLim)
 {
     m_xmlBytes = xmlBytes;
     m_tags     = tags;
     Reset(ichMin, ichLim);
 }