shlomif / perl-XML-LibXML

The XML-LibXML CPAN Distribution for Processing XML using the libxml2 library
https://metacpan.org/release/XML-LibXML
Other
17 stars 35 forks source link

Cannot set empty namespace xmlns="" to element #67

Open iynehz opened 2 years ago

iynehz commented 2 years ago

I have a similar need as https://stackoverflow.com/questions/5155102/how-to-represent-default-null-namespace-using-perl-xmllibxml. That is to explicitly have a xmlns="" on an element.

Tried $element->setNameSpace("", "", 0); it does not work.

At this moment the workaround I can think of is to do it like $parser->parse_blanced_chunk(q{<foo xmlns=""></foo>}). But this is dirty and best we fix it in setNameSpace.

mrenvoize commented 1 year ago

We're having this issue too.. I see you started working on it @shlomif, do you have any plans to continue?

shlomif commented 1 year ago

We're having this issue too.. I see you started working on it @shlomif, do you have any plans to continue?

no immediate ones. pullreqs [with tests] are welcome

shlomif commented 1 year ago

@mrenvoize

mrenvoize commented 1 year ago

Thanks @shlomif, I'll start digging through docs around xs but have a feeling this may be outside my expertise at the moment.. I'll at least try to get a test written.