package NHtml;

/**
 * Сериализованный результат html-парсера.
 */
message THtmlChunksList {
    message TRange {
        required uint32 Offset = 1;
        required uint32 Length = 2;
    }

    message TAttribute {
        required TRange Name = 1;
        optional TRange Value = 2;
        optional uint32 Quote = 3;
        optional uint32 Namespace = 4;
    }

    message TChunk {
        required fixed64 Flags = 1;
        optional uint32 Format = 2;
        optional bytes Text = 3;
        optional uint32 Tag = 4;
        optional bool IsCDATA = 5;
        optional bool IsWhitespace = 6;
        optional uint32 Namespace = 7;
        repeated TAttribute Attributes = 8;
    }

    repeated TChunk Chunks = 1;
}
