Returns text for a specific children.

@param string path Path to the node.
@param integer pos Element position.

@return string The text of the node.
180987
public function text($path=null, $pos=0) {
		if($path === null) {
			$res = '';
			foreach($this->items('/*') as $i)
				$res .= $i->text();
			return $res;
		}
		else
			return $this->item($path, $pos)->text();
	}
1302947
public function getByPath($path)
    {
        if (isset($this->nodesByPath[$path])) {
            return $this->nodesByPath[$path];
        }

        return false;
    }
48714
@SuppressWarnings("unchecked")
  public <T> T get(String... path) {
    ExtensionAware root = searchRoot;
    for (String name : path) {
      ExtensionContainer children = root.getExtensions();
      root = (ExtensionAware) children.getByName(name);
    }
    return (T) root; // this is potentially unchecked.
  }
107493
private Xml getNodeDefault(String... path)
    {
        Xml node = root;
        for (final String element : path)
        {
            if (!node.hasChild(element))
            {
                return null;
            }
            node = node.getChild(element);
        }
        return node;
    }
471188
protected function getContent($path)
    {
        if (null === self::$root) {
            return null;
        }

        if (self::$root->getName() === $path) {
            return self::$root;
        }

        if (self::$root->hasChild($path) === true) {
            return self::$root->getChild($path);
        }

        return null;
    }
1084112
public function getChildByPath($path)
    {
        if (!is_array($path)) {
            $path = trim($path, " /");
            $pieces = explode("/", $path);
        } else {
             $pieces = $path;
        }
            
        if (!sizeof($pieces)) return $this;

        if ($alias = array_shift($pieces)) {

                $c = $this->getChildByAlias($alias);
                if (sizeof($pieces)) {
                    return $c->getChildByPath($pieces);
                } else {
                    return $c;
                }

        }
        return $this;
    }
1362558
public function item($path, $pos=0) {
		return new Node($this->xpath->evaluate($path)->item($pos));
	}
651119
public function children($path = "")
  {
    if ($path) {
      $parts = $this->split($path);
      $name = array_shift($parts);

      $children = array();
      if (isset($this->_subTrees[$name])) {
        $subtree = $this->_subTrees[$name];
        /* @var $subtree Wrapper_FS_Changes */
        $this->_appendChildren(
          $children, $name, $subtree->children($parts)
        );
      }
    } else {
      $children = $this->own();
      foreach ($this->_subTrees as $name => $subtree) {
        /* @var $subtree Wrapper_FS_Changes */
        $this->_appendChildren(
          $children, $name, $subtree->children()
        );
      }
    }

    return $children;
  }
617443
function leafs($path) {
		/** @var array(string => string) $result */
		$result = [];
		/** @var X[] $nodes */
		$nodes = $this->xpathA($path);
		foreach ($nodes as $node) {
			/** @var X $node */
			$result[] = df_leaf_s($node);
		}
		return $result;
	}
1121715
public function getChild($path)
	{
		$path    = str_replace(array('/', '\\'), '\\', $path);
		$names   = explode('\\', $path);
		$command = $this;

		foreach ($names as $name)
		{
			if (isset($command[$name]))
			{
				$command = $command[$name];

				continue;
			}

			return null;
		}

		return $command;
	}
1282810
function(path) {
    var p = path || this.path(); 
    var pp = (!p || p == "/")? null : p.substring(0, p.lastIndexOf("/"));
    return (pp=="")? "/" : pp;
  }
1033534
function (document, path) {
		  	var node = document.documentElement,
		  		i = 0,
		  		index;
		  while ((index = path[++i]) > -1){
			  node = node.childNodes[index];
		  }
		  return node;
		}
1209888
public function getNode($path)
    {
        // init
        $chunks = $this->splitPath($path);

        // action
        $curObj = $this;
        foreach ($chunks as $chunk) {
            // check, if attributes exist
            $regs = array();
            preg_match('/^([a-z]+)(?:\[(.*)\])?$/i', $chunk, $regs);

            // if there are attributes, store them in array
            $chunkAttributes = array();
            if (sizeof($regs) > 2) {
                // get chunk name
                $chunk = $regs[1];

                // get attributes
                $tmpAttributes = preg_split('/\,/', $regs[2]);
                for ($i = 0; $i < sizeof($tmpAttributes); $i++) {
                    list($key, $value) = preg_split('/\=/', $tmpAttributes[$i]); // split into key = value
                    $key = substr($key, 1, strlen($key) - 1); // remove @
                    $value = trim($value, '\''); // remove ''
                    $chunkAttributes[$key] = $value; // add to attributes list
                }
            }

            if (($curObj = $curObj->getChildNode($chunk, $chunkAttributes)) != null) {
                // zuweisung schon oben in if-block schon erfolgt
            } else {
                throw new ChildDoesNotExistException('Child node "'.$chunk.'" '.' ("'.$path.'") does not exist.');
            }
        }

        // return
        return $curObj;
    }
340333
public static Node getNode(Object root, Path path) {
         return path.getNode(convertToJson(root, "actual"));
     }
844248
@Override
    public Node get(ArchivePath path) {
        Validate.notNull(path, "No path was specified");
        Node node = content.get(path);
        if (node == null && contains(path)) {
            node = getNestedNode(path);
        }
        return node;
    }
868058
function(path) {
      var t = this;

      // Get the parts
      var parts = Array.isArray(path) ? path : path.split('/').filter(function(item){return item;});

      // Return the item at this level
      if (parts.length === 1) {
        return t.get('leaves').get(parts[0]);
      }

      // Return the item from the tree below
      var sub = t.get('branches').get(parts[0]);
      if (sub) {
        return sub.getByPath(parts.slice(1));
      }

      // Branch not found
      return null;
    }
909256
public function getChildPageByPath($path)
    {
        $page = $this;
        $pathParts = preg_split('#([/:])#', $path, -1, PREG_SPLIT_DELIM_CAPTURE);
        for($i=0; $i<count($pathParts); $i++) {
            $pathPart = $pathParts[$i];
            $i++;
            $nextSeparator = isset($pathParts[$i]) ? $pathParts[$i] : '/';
            if ($nextSeparator == '/') {
                $pages = $page->getRecursiveChildComponents(array(
                                'filename' => $pathPart,
                                'pseudoPage'=>true,
                                'limit'=>1),
                            array('pseudoPage'=>false));
            } else {
                // if path is separated by ':', id comes without '-', search for child-component
                $pages = $page->getRecursiveChildComponents(array(
                                'id' => '-' . $pathPart,
                                'pseudoPage'=>false,
                                'limit'=>1),
                            array('pseudoPage'=>false));
            }
            $page = current($pages);
            if (!$page) break;
        }
        return $page;
    }