TobiasNickel / tXml

:zap:very small and fast xml-parser in pure javascript:zap:
MIT License
217 stars 28 forks source link

support for changing items inside JSON with help of existing methods like getElementsById #28

Open pranav-js opened 2 years ago

pranav-js commented 2 years ago

Thank you for lib ❤️. This is a feature request.

Right now getElementById returns a parsed XML object, but it would be great if we could change and replace it inside the original JSON and convert it to XML.

TobiasNickel commented 2 years ago

I am not sure if I understand this suggestion right, you would like this one element as a string? Then the txml.stringify method can be used.

pranav-js commented 2 years ago

I am not sure if I understand this suggestion right, you would like this one element as a string? Then the txml.stringify method can be used.

No I am saying, if it would change any object in the parsed XML realtime it would be great. for example changing one entire key object values and parse it back XML. one such method addition

arthurlomakin11 commented 2 years ago

I am not sure if I understand this suggestion right, you would like this one element as a string? Then the txml.stringify method can be used.

No I am saying, if it would change any object in the parsed XML realtime it would be great. for example changing one entire key object values and parse it back XML. one such method addition

Didn't understood this. You can use txml.stringify every time you want to reflect changes