Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #19 #20

Merged
merged 1 commit into from
Dec 4, 2014
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