xml2 icon indicating copy to clipboard operation
xml2 copied to clipboard

Support for prefixed names in writing xml nodes

Open eblondel opened this issue 5 months ago • 9 comments

Dear all, i'm in the process to migrate from XML to xml2 a series of packages i'm maintaining. Although for some dealing with single namespace, the task is relatively easy (i started with geosapi, i'm now looking at packages where XML schemas include various namespaces, such as atom4R (as starter) to then move towards more complex ones like geometa.

In this context, the practice is to use prefixed element names instead of element names made of local parts only coupled with repeating xmlns attributes.

I didn't find the way to do that in xml2, although it's possible with XML with xmlOutputDOM / nameSpace argument. I tried with xml2::xml_set_namespace but it doesn't have any effect.

Is it a missing feature? If not, could you give me an example.

Thanks a lot Emmanuel

eblondel avatar Jan 28 '24 16:01 eblondel