Attean...RQLXML(3pm)
π AtteanX::Parser::SPARQLXML β the SPARQL XML parser bestie
okay so real talk, this page lives in the User Contributed Perl Documentation section of the manual, and it's all about AtteanX::Parser::SPARQLXML, version 0.035. That's the whole vibe. Let's get into it β¨
πΈ SYNOPSIS πΈ
use Attean;
my $parser = Attean->get_parser('SPARQLXML')->new();
$parser->parse_cb_from_io( $fh );
that's literally the entire flex. three lines. grab the parser through Attean->get_parser('SPARQLXML'), call ->new() on it, then feed it a filehandle. slay π
π¦ DESCRIPTION π¦
...
no fr that's what it says π the description is literally just .... it's giving mysterious. it's giving "figure it out yourself, bestie." iconic honestly π
β¨ METHODS β¨
canonical_media_type
hands you back the canonical media type for SPARQL XML, which is:
application/sparql-results+xml
that's the one. the main character media type π
media_types
gives you a list of media types this SPARQL XML parser can handle. and the list is... drumroll... application/sparql-results+xml. yes it's the same one. yes it's a list with one entry. we support her π«Ά
file_extensions
returns a list of file extensions that can be parsed with this parser. that's it, that's the method β it just tells you which file extensions are valid for it π
parse_cb_from_io( $fh )
okay this one's the workhorse. it calls the "$parser->handler" function once for every Attean::API::Binding object that results from parsing the data read out of the IO::Handle object $fh. one callback per binding, no cap. so bring your filehandle and your handler and let it cook π₯
parse_cb_from_bytes( $data )
same energy, different input. this one calls the "$parser->handler" function once for each Attean::API::Binding object that comes out of parsing the data in the UTF-8 encoded byte string $data. key detail bestie β it's UTF-8 encoded bytes, not just any old string π
π BUGS π
found a bug? got a feature request? please report either one through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. don't suffer in silence, bestie, tell the maintainers π
π AUTHOR π
Gregory Todd Williams "<gwilliams@cpan.org>" β the legend themselves β¨
π COPYRIGHT π
Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
lowkey important: this is free software under the same terms as Perl itself, so you can redistribute and/or modify it β just keep the copyright notice and don't be weird about it π«Ά
and that's the whole page, bestie π sign-off time: this was perl v5.40.0, dated 2025-01-26, and the page is Attean...RQLXML(3pm) from the User Contributed Perl Documentation. go forth and parse that SPARQL XML ππ
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms