Skip to main content

parse

function

clojure.data.xml/parse

Available in:BBCLJ
(parse [source & {:keys [include-node? location-info coalescing supporting-external-entities allocator namespace-aware replacing-entity-references validating reporter resolver support-dtd], :or {include-node? #{:characters :element}, location-info true, coalescing true, supporting-external-entities false}}])
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 }

No examples yet. Be the first to add one!

Categories