data.xml

Not parsing multiple top-level elements

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    [org.clojure/clojure "1.5.1"] and [org.clojure/data.xml "0.0.7"]

Description

(xml/parse-str "<a>1</a><b>2</b>")
Emits
{:tag :a, :attrs {}, :content ("1")}

Where did "b" go?

Activity

Hide
Ryan Senior added a comment -

That's correct. Closing this as it's by design.

Show
Ryan Senior added a comment - That's correct. Closing this as it's by design.
Hide
Alan Busby added a comment -

Sorry, feel free to close this.
Reviewing the code it appears that parse-str only accepts full XML documents and can't handle fragments, or is that incorrect?

Show
Alan Busby added a comment - Sorry, feel free to close this. Reviewing the code it appears that parse-str only accepts full XML documents and can't handle fragments, or is that incorrect?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: