# XML::Grove::Path - perldoc - [phpMan]

## NAME
    [XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown) - return the object at a path

## SYNOPSIS
     use [XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown);

     # Using at_path method on [XML::Grove::Document](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3ADocument/markdown) or [XML::Grove::Element](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3AElement/markdown):
     $xml_obj = $grove_object->at_path("/some/path");

     # Using an [XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown) instance:
     $pather = [XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown)->new();
     $xml_obj = $pather->at_path($grove_object);

## DESCRIPTION
    "[XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown)" returns XML objects located at paths. Paths are strings of element names or
    XML object types separated by slash ("/") characters. Paths must always start at the grove
    object passed to `at_path()'. "[XML::Grove::Path](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AGrove%3A%3APath/markdown)" is not XPath, but it should become obsolete
    when an XPath implementation is available.

    Paths are like URLs

        /html/body/ul/li[4]
        /html/body/#pi[2]

    The path segments can be element names or object types, the objects types are named using:

        #element
        #pi
        #comment
        #text
        #cdata
        #any

    The `"#any"' object type matches any type of object, it is essentially an index into the
    contents of the parent object.

    The `"#text"' object type treats text objects as if they are not normalized. Two consecutive
    text objects are separate text objects.

## AUTHOR
    Ken MacLeod, <ken@bitsko.slc.ut.us>

## SEE ALSO
### perl

    Extensible Markup Language (XML) <<http://www.w3c.org/XML>>

