Closed sasa-yovanovicc closed 7 years ago
Ah I see what you mean - while xml should have one root element, there can be other stuff around it other than the prolog, like comments and instructions: https://en.m.wikipedia.org/wiki/Root_element
That aside, the "easy" way is to write a hook to str_replace
(or substr
) it from the submission. Or you can use the "mask" setting to fully customize the fields transformation, but you'll have to manually make all of xml for each field. But you might actually just be able to put an "empty" prolog statement in the root, depending on what your endpoint wants to see.
To clarify the last part, if there is xml in the 'root' setting (with a sprintf
placeholder for the content) it won't wrap the content. So you could even set a comment instead:
<!-- ignore --> %s
(nevermind, got confused between mask and xml handling)
I dont need root elements
But if i leave Root element(s) empty I got XML with "post" root element.
How to exclude root element in settings?