package core:encoding/entity

Types

Error ¶

Error :: enum u8 {
	None                    = 0, 
	Tokenizer_Is_Nil, 
	Illegal_NUL_Character, 
	Illegal_UTF_Encoding, 
	Illegal_BOM, 
	CDATA_Not_Terminated, 
	Comment_Not_Terminated, 
	Invalid_Entity_Encoding, 
}

Tokenizer ¶

Tokenizer :: struct {
	r:           rune,
	w:           int,
	src:         string,
	offset:      int,
	read_offset: int,
}

XML_Decode_Option ¶

XML_Decode_Option :: enum u8 {
	// 		Do not decode & entities. It decodes by default.
	// 		If given, overrides `Decode_CDATA`.
	No_Entity_Decode, 
	// 		CDATA is unboxed.
	Unbox_CDATA, 
	// 		Unboxed CDATA is decoded as well.
	// 		Ignored if `.Unbox_CDATA` is not given.
	Decode_CDATA, 
	// 		Comments are stripped.
	Comment_Strip, 
}
 

Default: CDATA and comments are passed through unchanged.

XML_Decode_Options ¶

XML_Decode_Options :: bit_set[XML_Decode_Option; u8]

Constants

CDATA_END ¶

CDATA_END :: "]]>"

CDATA_START ¶

CDATA_START :: "

COMMENT_END ¶

COMMENT_END :: "-->"

COMMENT_START ¶

COMMENT_START :: "