in reply to XML parsing

"I have been 'asked' not to download the XML module on my workstation"

I'd be asking about the reasoning behind this nonsense.

Regarding your printf warnings, it appears as though the code you provide is not the same code generating the warnings (given one of the warnings states an actual format, where your code does not). printf requires a string format template, followed by a list of items to inject into the string. Here's an example:

printf "Hello %s, your number is %d\n", $name, $num;

See this for the list of valid formats.

In your case, you don't need printf, as your variables interpolate just fine with print. Besides, as choroba says, sending user data into printf without any validation checks can be problematic.

Replies are listed 'Best First'.
Re^2: XML parsing
by hippo (Archbishop) on Dec 11, 2019 at 18:37 UTC

    The printf statement in the OP has one argument which includes interpolated strings from some arbitrary XML. It's quite possible that those contain unescaped % symbols. With certain input I'm sure such warnings could be generated by catfish1116's code.

    However since catfish1116 still hasn't deigned to provide us with the input data, despite numerous requests in the other thread, it's all just guesswork.