in reply to Re^3: XML::LibXML creating nodes with a string OR a node
in thread XML::LibXML creating nodes with a string OR a node

But why? If the sub createOwner is under your control, then the fix suggested by choroba solves the problem in only a few characters. I may be wrong, but I get the feeling from this and the previous questions you have posted that you are trying to bend the module to your wishes instead of accepting the API the way it is and just using it...

This is off topic, but the reason is that createOwner is just an example. I will have many functions like that one, and the nodes they are filling can take plain text, or subnodes, depending on input I do not control.

Worik

  • Comment on Re^4: XML::LibXML creating nodes with a string OR a node