STRING_FILTER is a policy type which determines how strings are transformed for permanent storage inside the DOM. By default, we store slices of the original XML document. However, if the parsing is done using temporary buffers, STRING_FILTER will want to copy (.idup) the strings before letting us store them. STRING_FILTER can also be used to implement a string pool, to make a trade-off between memory consumption and speed (an XML document is likely to contain many repeating strings, such as tag and attribute names). Merging identical strings to obtain unique string pointers or IDs would also allow very quick tag/attribute name lookup, and avoid repeated entity decoding.