Syntax::Highlight::XML - syntax highlighting for XML
use Syntax::Highlight::XML; my $syntax = "Syntax::Highlight::XML"->new; print $syntax->highlight($filehandle);
Outputs pretty syntax-highlighted HTML for XML. (Actually just adds <span> elements with class attributes. You're expected to bring your own CSS.)
<span>
class
highlight($input)
Highlight some XML.
$input may be a file handle, filename or a scalar ref of text.
$input
Returns a string of HTML.
tokenize($input)
This is mostly intended for subclassing Syntax::Highlight::XML.
Returns an arrayref of token objects. The exact API for the token objects is subject to change, but currently they support TYPE and spelling methods.
TYPE
spelling
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Syntax-Highlight-RDF.
Syntax::Highlight::JSON2, Syntax::Highlight::RDF.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install Syntax::Highlight::RDF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Syntax::Highlight::RDF
CPAN shell
perl -MCPAN -e shell install Syntax::Highlight::RDF
For more information on module installation, please visit the detailed CPAN module installation guide.