The command
$ xmlstarlet sel -t -c "/collection/record" file.xml
seems to load the whole file into memory, before applying the given Xpath expression. This is not usable for large XML files.
Does xmlstarlet
provide a streaming mode to extract subelements from a large (100G+) XML file?