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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…