Does the library guarantee that the order of elements in the result array matches their order in the original XML document?
For example, let's consider the following XML:
<Document>
<BkToCstmrStmt>
<Stmt>
<Ntry>...entry 1 content...</Ntry>
<Ntry>...entry 2 content...</Ntry>
<Ntry>...entry 3 content...</Ntry>
<Ntry>...entry 4 content...</Ntry>
</Stmt>
</BkToCstmrStmt>
</Document>
This XML is then parsed with preserveOrder: false and an isArray callback that forces Document.BkToCstmrStmt.Stmt.Ntry to always be an array.
Is the resulting Ntry element array (Ntry: [entry1, entry2, entry3, entry4]) always in document order — entry 1 first, entry 2 second, and so on? Does this also hold if other sibling elements appear between the elements? And could such an implementation detail change between versions?
Does the library guarantee that the order of elements in the result array matches their order in the original XML document?
For example, let's consider the following XML:
This XML is then parsed with
preserveOrder: falseand anisArraycallback that forces Document.BkToCstmrStmt.Stmt.Ntry to always be an array.Is the resulting
Ntryelement array (Ntry: [entry1, entry2, entry3, entry4]) always in document order — entry 1 first, entry 2 second, and so on? Does this also hold if other sibling elements appear between the elements? And could such an implementation detail change between versions?