Closed ararslan closed 6 years ago
When checking out my branch here and Kenta's branch from his EzXML PR, things mostly work, but we instead run into an issue of fields appearing in a different order. In particular, in the loop at the end of test/runtests.jl, the xml2
value is normalized as
<?xml version="1.0"?>
<GetUserResponse>
<GetUserResult>
<User>
<PasswordLastUsed>2015-12-23T22:45:36Z</PasswordLastUsed>
<Arn>arn:aws:iam::012541411202:root</Arn>
<UserId>012541411202</UserId>
<CreateDate>2015-09-15T01:07:23Z</CreateDate>
</User>
</GetUserResult>
<ResponseMetadata>
<RequestId>837446c9-abaf-11e5-9f63-65ae4344bd73</RequestId>
</ResponseMetadata>
</GetUserResponse>
whereas the normalization of the string created from the dict-parsed xml2
is
<?xml version="1.0"?>
<GetUserResponse>
<GetUserResult>
<User>
<Arn>arn:aws:iam::012541411202:root</Arn>
<UserId>012541411202</UserId>
<PasswordLastUsed>2015-12-23T22:45:36Z</PasswordLastUsed>
<CreateDate>2015-09-15T01:07:23Z</CreateDate>
</User>
</GetUserResult>
<ResponseMetadata>
<RequestId>837446c9-abaf-11e5-9f63-65ae4344bd73</RequestId>
</ResponseMetadata>
</GetUserResponse>
Note the ordering within <User>
: for no apparent reason, PasswordLastUsed
gets put third instead of first.
HI @ararslan.
On my system, with Julia 0.6.4, your EzXML port passes all the tests with this change: https://github.com/invenia/XMLDict.jl/pull/1
The new version of EzXML.jl (https://github.com/bicycle1885/EzXML.jl/releases/tag/v0.7.0) includes the version
and encoding
accessors.
Thanks for submitting that change, @samoconnor, and thank you @bicycle1885 for tagging a new EzXML release!
Looks like on 0.7 the ordering issue I noted above is still happening. I'm not clear on why yet.
It looks like the return type for filter(f, ::OrderedDict)
changed between 0.6 and 0.7. In 0.7, it returns a Dict
rather than another OrderedDict
, which causes unpredictable ordering for iteration.
I had to work around an issue in DataStructures. I'll submit a PR to fix things there, but in the meantime can we go ahead with this?
DataStructures PR: https://github.com/JuliaCollections/DataStructures.jl/pull/401
Thanks! Could I trouble you for a new tag as well? 🙂
Still a work in progress, want to make sure CI and everything agrees