JuliaCloud / XMLDict.jl

XMLDict implements a simple Associative interface for XML documents.
Other
33 stars 11 forks source link

Merge with XMLconvert.jl? #3

Closed femtotrader closed 3 years ago

femtotrader commented 8 years ago

https://github.com/bcbi/XMLconvert.jl seems to provide quite similar features.

Maybe a merge should be considered?

see https://github.com/bcbi/XMLconvert.jl/issues/5

samoconnor commented 7 years ago

@paulstey @mirestrepo That's intriguing @femtotrader.

I assume that you have used both? Do you have any comments on what nice features each library has?

XMLDict began as a set of convenience functions for dealing with AWS responses in AWSS3.jl and AWSSDB.jl.

My summary of XMLDict features follows:

xml = parse_xml("""
<ListAllMyBucketsResult>
  <Buckets>
    <Bucket><Name>quotes</Name><CreationDate>2006-02-03T16:45:09.000Z</CreationDate></Bucket>
    <Bucket><Name>samples</Name><CreationDate>2006-02-03T16:41:58.000Z</CreationDate></Bucket>
  </Buckets>
</ListAllMyBucketsResult>
""")

@test [b["Name"] for b in xml["Buckets"]["Bucket"]] == ["quotes", "samples"]
femtotrader commented 7 years ago

For my own use, one big difference is that XMLconvert can convert XML to MultiDict and XMLDict can convert XML to simple Dict, Vector. I was previously using XMLconvert for TALib.jl until I found XMLDict. See https://github.com/femtotrader/TALib.jl/blob/master/src/describe.jl I found much simpler to have Dict, Vector ... than MultiDict According doc, XMLconvert drops attributes of the XML (I don't care for my purpose... but it can be important for some usages)

mirestrepo commented 7 years ago

When we first developed XMLconvert we were not aware of XMLDict. We were using it to handle large XML responses from PubMed/ClinicalTrials.gov. We also started out with the use of Dict and Vector instead of MultiDict, but we changed, as it bacame unpractical to be checking all the time whether we were accessing vectors or just the value in the key. At the beginning we were dropping attributes, but later wrote a method that converts the attributes to elements - and from then on they are handled in the same way. We've had in the back of our minds to try to reproduce our results using XMLDict to have a better sense of the advantages of each library. But we haven't found the time. XMLconvert also has few utility functions to flatten an XML and print the paths to all keys. We envisioned the library supporting functionality not only to convert to Dict but also to other formats (e.g JSON). Perhaps @paulstey can comment more on the specific features

DilumAluthge commented 3 years ago

XMLconvert.jl (https://github.com/bcbi/XMLconvert.jl) is now deprecated and archived.

So this issue can be closed.

cc: @femtotrader