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.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
XmlParser client which builds a DOM efficiently. WORK IN PROGRESS.