xmlserializer icon indicating copy to clipboard operation
xmlserializer copied to clipboard

Handle XML node name prefixes

Open rvanlaak opened this issue 7 years ago • 1 comments

Based on how serializeNamespace was implemented already it seems that xml is supported quite nicely already.

This PR adds some functionality and tests to allow prefixing of xml node names as well.

<prefix:element><child></child></prefix:element>

or

<prefix:element />

rvanlaak avatar Sep 27 '18 09:09 rvanlaak

Thanks for the changes! Happy to merge this functionality in.

It looks like the problem you had to solve was for xmlns to be serialized correctly. If I look at the tests that you added however this is not reflected here. I copied the latest tests/specs/serializerSpec.js file over and ran it against the old code, and no tests are failing. Could you add test(s) for the new behaviour? This will make sure we don't lose the functionality later.

Also, this might support us in refactoring the serializeNamespace() method, should it gets too crufty.

cburgmer avatar Oct 02 '18 19:10 cburgmer