mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 07:30:13 +01:00
Make query xml
return nodes in document order (#13047)
# Description `query xml` used to return results from an XPath query in a random, non-deterministic order. With this change, results get returned in the order they appear in the document. # User-Facing Changes `query xml` will now return results in a non-random order. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting
This commit is contained in:
parent
c310175a1e
commit
d4fa014534
@ -88,7 +88,7 @@ pub fn execute_xpath_query(
|
||||
|
||||
match r {
|
||||
sxd_xpath::Value::Nodeset(ns) => {
|
||||
for n in ns.into_iter() {
|
||||
for n in ns.document_order() {
|
||||
record.push(key.clone(), Value::string(n.string_value(), call.head));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user