You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, XML processing should be independent of the naming of namespaces (i.e. here the XML should be processed the same even if a is changed to b), which is extremely cumbersome with JSON.
I think there should be an input option to anonymize namespaces, such that the above is instead transformed to:
{
"A": {
"@xmlns": "foo.bar"
}
}
Naturally, the anonymization should be applied recursively to inner elements.
Possible issues:
Repetition: If the input XML is <a:A xmlns:a="..."><a:B/></a:A>, then there's no need to repeat the namespace URL of a for B, but a trivial implementation probably will.
Repetition: If the input XML is <a:A xmlns:a="..."><b:B xmlns:b="..."><a:C/></b:B></a:A>, then the namespace URL of a must be repeated for C. This is quite uncommon, since namespaces are typically only used for wrapping. For example, SOAP envelopes use namespace "http://www.w3.org/2003/05/soap-envelope" and the same namespace is typically not used in the SOAP message content.
Empty namespaces should be handled correctly. For example, <a:A xmlns:a="..."><B/></a:A> should be transformed such that B contains "@xmlns": "".
Will do this myself at some point if I find time...
The text was updated successfully, but these errors were encountered:
Consider the XML:
Currently, the task transforms this to:
However, XML processing should be independent of the naming of namespaces (i.e. here the XML should be processed the same even if
a
is changed tob
), which is extremely cumbersome with JSON.I think there should be an input option to anonymize namespaces, such that the above is instead transformed to:
Naturally, the anonymization should be applied recursively to inner elements.
Possible issues:
<a:A xmlns:a="..."><a:B/></a:A>
, then there's no need to repeat the namespace URL ofa
forB
, but a trivial implementation probably will.<a:A xmlns:a="..."><b:B xmlns:b="..."><a:C/></b:B></a:A>
, then the namespace URL ofa
must be repeated forC
. This is quite uncommon, since namespaces are typically only used for wrapping. For example, SOAP envelopes use namespace "http://www.w3.org/2003/05/soap-envelope" and the same namespace is typically not used in the SOAP message content.<a:A xmlns:a="..."><B/></a:A>
should be transformed such thatB
contains"@xmlns": ""
.Will do this myself at some point if I find time...
The text was updated successfully, but these errors were encountered: