Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrangement of children not preserved #45

Open
roniemartinez opened this issue Mar 11, 2020 · 3 comments
Open

Arrangement of children not preserved #45

roniemartinez opened this issue Mar 11, 2020 · 3 comments

Comments

@roniemartinez
Copy link

roniemartinez commented Mar 11, 2020

How do you preserve the arrangement of children with same name?

XML To JSON:
Code:

dumps(badgerfish.data(eTree.fromstring('<alice><david>edgar</david><bob>charlie</bob><david>edgar</david></alice>')))

Output:

{"alice": {"david": [{"$": "edgar"}, {"$": "edgar"}], "bob": {"$": "charlie"}}}

Back to XML:
Code:

eTree.tostring(badgerfish.etree(loads({"alice": {"david": [{"$": "edgar"}, {"$": "edgar"}], "bob": {"$": "charlie"}}}))[0]).decode('utf-8')

Output:

<alice><david>edgar</david><david>edgar</david><bob>charlie</bob></alice>
@chrisinmtown
Copy link

This question is about six months old and has zero reply. Is the author of this project still responding to issues, or do we have to consider this project abandoned?

@sanand0
Copy link
Owner

sanand0 commented Sep 1, 2020

My apologies. I have not had a chance to look at the issues most of this year, and I believe that will continue until November.

Thanks for prompting me to clarify, @chrisinmtown

@chrisinmtown
Copy link

Thanks @sanand0 for the quick reply, I hear you saying that we cannot expect any changes in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants