Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/SoapBox/Formatter/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 4 additions & 2 deletions src/SoapBox/Formatter/Parsers/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down