private function buildCompositeContent(XMLProcessableInterface $message) { $content = ''; foreach ($message->getChildren() as $child) { $content .= $this->buildContent($child); } return $content; }
public function getNumNodeOccurrences($xml, XMLProcessableInterface $node) { $nodeName = $node->getPathWithSeparator('/'); $parsed = new \SimpleXMLElement($xml); return count($parsed->xpath($nodeName)); }