Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xacobeo(1p) [debian man page]

XACOBEO(1p)						User Contributed Perl Documentation					       XACOBEO(1p)

NAME
xacobeo - Graphical interface for running XPath queries. SYNOPSIS
xacobeo [OPTION]... [file [xpath]] Options: -h, --help brief help message -v, --version display the version of Xacobeo, XML::LibXML and libxml2 that are used and exit --html parse the input file as an HTML document Where file is a XML document and xpath a XPath query. OPTIONS
--help Print a brief help message and exits. --html Parse the file in the command line using the HTML parser. DESCRIPTION
This program provides a simple graphical user interface (GUI) for executing XPath queries and seeing their results. The GUI tries to provide all the elements that are needed in order to write, test and execute XPath queries without too many troubles. It displays the Document Object Model (DOM) and the namespaces used. The program registers the namespaces automatically and each element is displayed with its associated namespaces. All is performed with the idea of being able of running an XPath query as soon as possible without having to fight with the document's namespaces and by seeing automatically under which namespace each element is. This program is not an XML editor, at least not at this point, it's meant to be used for constructing and executing XPath queries. RATIONALE
The main idea behind this application is to provide a simple way for building XPath queries that will be latter integrated in to a program or XSLT transformation paths. Therefore, this program goal is to load an XML document and to display it as an XML parser sees it. Thus each node element is prefixed with its namespace. IMPLEMENTATION
This program uses XML::LibXML (libxml2) for all XML manipulations and Gtk2 for the graphical interface. LIMITATIONS
For the moment, the program focuses only on XPath and doesn't allow the XML document to be edited. AUTHOR
Emmanuel Rodriguez <potyl@cpan.org>. COPYRIGHT AND LICENSE
Copyright (C) 2008,2009 by Emmanuel Rodriguez. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2011-11-16 XACOBEO(1p)

Check Out this Related Man Page

Test::XML::XPath(3pm)					User Contributed Perl Documentation				     Test::XML::XPath(3pm)

NAME
Test::XML::XPath - Test XPath assertions SYNOPSIS
use Test::XML::XPath tests => 3; like_xpath( '<foo />', '/foo' ); # PASS like_xpath( '<foo />', '/bar' ); # FAIL unlike_xpath( '<foo />', '/bar' ); # PASS is_xpath( '<foo>bar</foo>', '/foo', 'bar' ); # PASS is_xpath( '<foo>bar</foo>', '/bar', 'foo' ); # FAIL # More interesting examples of xpath assertions. my $xml = '<foo attrib="1"><bish><bosh args="42">pub</bosh></bish></foo>'; # Do testing for attributes. like_xpath( $xml, '/foo[@attrib="1"]' ); # PASS # Find an element anywhere in the document. like_xpath( $xml, '//bosh' ); # PASS # Both. like_xpath( $xml, '//bosh[@args="42"]' ); # PASS DESCRIPTION
This module allows you to assert statements about your XML in the form of XPath statements. You can say that a piece of XML must contain certain tags, with so-and-so attributes, etc. It will try to use any installed XPath module that it knows about. Currently, this means XML::LibXML and XML::XPath, in that order. NB: Normally in XPath processing, the statement occurs from a context node. In the case of like_xpath(), the context node will always be the root node. In practice, this means that these two statements are identical: # Absolute path. like_xpath( '<foo/>', '/foo' ); # Path relative to root. like_xpath( '<foo/>', 'foo' ); It's probably best to use absolute paths everywhere in order to keep things simple. NB: Beware of specifying attributes. Because they use an @-sign, perl will complain about trying to interpolate arrays if you don't escape them or use single quotes. FUNCTIONS
like_xpath ( XML, XPATH [, NAME ] ) Assert that XML (a string containing XML) matches the statement XPATH. NAME is the name of the test. Returns true or false depending upon test success. unlike_xpath ( XML, XPATH [, NAME ] ) This is the reverse of like_xpath(). The test will only pass if XPATH does not generates any matches in XML. Returns true or false depending upon test success. is_xpath ( XML, XPATH, EXPECTED [, NAME ] ) Evaluates XPATH against XML, and pass the test if the is EXPECTED. Uses findvalue() internally. Returns true or false depending upon test success. set_xpath_processor ( CLASS ) Set the class name of the XPath processor used. It is up to you to ensure that this class is loaded. In all cases, XML must be well formed, or the test will fail. SEE ALSO
Test::XML. XML::XPath, which is the basis for this module. If you are not conversant with XPath, there are many tutorials available on the web. Google will point you at them. The first one that I saw was: <http://www.zvon.org/xxl/XPathTutorial/>, which appears to offer interactive XPath as well as the tutorials. AUTHOR
Dominic Mitchell <cpan2 (at) semantico.com> COPYRIGHT AND LICENSE
Copyright 2002 by semantico This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2009-07-02 Test::XML::XPath(3pm)
Man Page