public function FrxRenderer::extractChildSource in Forena Reports 7.4
Get the textual representations of html for the configuration engine.
1 call to FrxRenderer::extractChildSource()
- FrxRenderer::extractXPathInnerHTML in renderers/
FrxRenderer.inc - Extracts the inner html of all nodes that match a particular xpath expression.
File
- renderers/
FrxRenderer.inc, line 925 - FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Class
- FrxRenderer
- @file FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Code
public function extractChildSource(DOMNode $node) {
$content = '';
foreach ($node->childNodes as $child) {
switch ($child->nodeType) {
case XML_ELEMENT_NODE:
$content .= $this->dom
->saveXML($child);
break;
case XML_TEXT_NODE:
case XML_ENTITY_REF_NODE:
case XML_ENTITY_NODE:
$content .= $child->textContent;
break;
case XML_COMMENT_NODE:
$content .= '<!--' . $child->data . '-->';
break;
}
}
return $content;
}