diff --git a/src/SoapBox/Formatter/Formatter.php b/src/SoapBox/Formatter/Formatter.php index 9029d13..2556fa0 100644 --- a/src/SoapBox/Formatter/Formatter.php +++ b/src/SoapBox/Formatter/Formatter.php @@ -71,8 +71,8 @@ public function toYaml() { return $this->parser->toYaml(); } - public function toXml() { - return $this->parser->toXml(); + public function toXml($baseNode = 'xml') { + return $this->parser->toXml($baseNode); } public function toCsv() { diff --git a/src/SoapBox/Formatter/Parsers/Parser.php b/src/SoapBox/Formatter/Parsers/Parser.php index 109367e..83eebe5 100644 --- a/src/SoapBox/Formatter/Parsers/Parser.php +++ b/src/SoapBox/Formatter/Parsers/Parser.php @@ -106,10 +106,12 @@ private function xmlify($data, $structure = null, $basenode = 'xml') { /** * Return an xml representation of the data stored in the parser * + * @param string $baseNode + * * @return string An xml string representing the encapsulated data */ - public function toXml() { - return $this->xmlify($this->toArray()); + public function toXml($baseNode = 'xml') { + return $this->xmlify($this->toArray(), null, $baseNode); } private function csvify($data) {