logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

XML::XQL::DOM - Adds XQL support to XML::DOM nodes

Description

       XML::XQL::DOM adds methods to XML::DOM nodes to support XQL queries on XML::DOM document structures.

       See XML::XQL and XML::XQL::Query for more details.  XML::DOM::Node describes the xql() method.

perl v5.36.0                                       2022-12-06                                 XML::XQL::DOM(3pm)

Name

       XML::XQL::DOM - Adds XQL support to XML::DOM nodes

Synopsis

        use XML::XQL;
        use XML::XQL::DOM;

        $parser = new XML::DOM::Parser;
        $doc = $parser->parsefile ("file.xml");

        # Return all elements with tagName='title' under the root element 'book'
        $query = new XML::XQL::Query (Expr => "book/title");
        @result = $query->solve ($doc);

        # Or (to save some typing)
        @result = XML::XQL::solve ("book/title", $doc);

        # Or (see XML::DOM::Node)
        @result = $doc->xql ("book/title");

See Also