public static int NextOpening(BufferEntry entry, int position, string name) { int index; byte value; int size = entry.PrimarySize; byte[] primary = entry.PrimaryData; while (position < size) { index = position + 1; value = primary[position]; if (value == '\0') { return(-1); } if (value == '<' && entry.IsEqual(ref index, name)) { value = entry.GetByteAt(index); if (value == ' ' || value == '>' || value == '/' || value == '\r' || value == '\n' || value == '\t') { break; } } position = index; } return(position); }
public static int NextAttributeValue(BufferEntry entry, int position) { byte value; while (true) { value = entry.GetByteAt(position); if (value == '"' || value == '\0') { break; } position++; } return(value != '\0' ? position : -1); }