Browse Source

Make a little closed to convertQDC.xsl

pull/101/head
Adam Vessey 13 years ago
parent
commit
6006effbb3
  1. 39
      ObjectHelper.inc

39
ObjectHelper.inc

@ -448,16 +448,35 @@ class ObjectHelper {
$rows = array(); $rows = array();
foreach ($simplexml->getNamespaces(TRUE) as $ns) { foreach ($simplexml->getNamespaces(TRUE) as $ns) {
foreach ($simplexml->children($ns) as $child) { foreach ($simplexml->children($ns) as $child) {
$rows[] = array( $data = array();
array( $rendered_data = '';
'data' => $child->getName(), if ($grand_children = $child->children()) {
'class' => 'dc-tag-name', foreach($grand_children as $grand_child) {
), $data[] = $grand_child->tagName() . ' = ' . (string)$grand_child;
array( }
'data' => (string)$child, }
'class' => 'dc-content', else {
), $rendered_data = (string)$child;
); }
if ($data) {
$rendered_data = theme('item_list', $data);
}
if ($rendered_data) {
$rows[] = array(
array(
'data' => $child->getName(),
'class' => 'dc-tag-name',
),
array(
'data' => $rendered_data,
'class' => 'dc-content',
),
);
}
} }
} }

Loading…
Cancel
Save