XML(-ish) output?
Oestman, Fredrik
Fredrik_Oestman@mentor.com
Tue Oct 2 08:24:00 GMT 2012
Frank Ch. Eigler wrote:
> Albretch Mueller <lbrtchx@gmail.com> writes:
> > I couldn't find any reference to generating output files as XML
> > documents in sourceware's documentation per se [...]
> One can do so from first principles:
>
> probe FOO {
> printf("<tag attrib=\"foo\">\n");
> printf("<bar/>\n");
> printf("</tag>\n");
> }
>
> How much deeper support for xml generation were you hoping for?
> Quoting of some sort?
I've once experimented with utility functions providing brackets and the end tag, but I ran into problems with the maximum string length when nesting. So most of the output was from first principles as above.
function tags( name, content )
{
return sprint( "<%s>%s</%s>/n", name, content, name );
}
Cheers,
Fredrik Östman
http://go.mentor.com/sourceryanalyzer/
More information about the Systemtap
mailing list