This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XML(-ish) output?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]