/// <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); }
/// <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); }
public ElementBounds(byte[] xmlBytes, ElementTags tags, int ichMin, int ichLim) { m_xmlBytes = xmlBytes; m_tags = tags; Reset(ichMin, ichLim); }
/// <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); }
/// <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); }
public ElementBounds(byte[] xmlBytes, ElementTags tags, int ichMin, int ichLim) { m_xmlBytes = xmlBytes; m_tags = tags; Reset(ichMin, ichLim); }