Back
parse (clj)
(source)function
(parse source & {:as opts})
Parses an XML input source into a a tree of Element records.
The element tree is realized lazily, so huge XML files can be streamed through a depth-first tree walk.
Input source can be a java.io.InputStream or java.io.Reader
Options:
:include-node? subset of #{:element :characters :comment}, default #{:element :characters}
:location-info pass false to skip generating location meta data, default true
See https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLInputFactory.html
for documentation on xml options. These are the defaults:
{:allocator nil ; XMLInputFactory/ALLOCATOR
:coalescing true ; XMLInputFactory/IS_COALESCING
:namespace-aware true ; XMLInputFactory/IS_NAMESPACE_AWARE
:replacing-entity-references true ; XMLInputFactory/IS_REPLACING_ENTITY_REFERENCES
:supporting-external-entities false ; XMLInputFactory/IS_SUPPORTING_EXTERNAL_ENTITIES
:validating false ; XMLInputFactory/IS_VALIDATING
:reporter nil ; XMLInputFactory/REPORTER
:resolver nil ; XMLInputFactory/RESOLVER
:support-dtd true ; XMLInputFactory/SUPPORT_DTD
}