type node_t = Element of element_t | Text of text_t
and element_t = {
tag_name: string
children: node_t list;
mutable deleted: bool
}
and text_t = {
text: string;
line_number: int;
}
Now, I have a XML node stored in a variable called xml_node
And the data is :
Out of curiosity, any reason why this field is mutable? It is typical in OCaml to use immutable fields and update records with the immutable update syntax (returns a copy of the record with the given changes).