Skip to content

Commit

Permalink
Merge pull request #20 from cecilozaur/master
Browse files Browse the repository at this point in the history
fixes #19
  • Loading branch information
Jaspaul committed Dec 4, 2014
2 parents c7b90cc + 35e08ff commit 8cdc4a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 8cdc4a6

Please sign in to comment.