Temporary Fix by Gaudenz:

$enc = new mxCodec(); $xmlNode = $enc->encode($model); $xml = addslashes(htmlentities(str_replace("\n", "
", $xmlNode->ownerDocument->saveXML($xmlNode))));

I can use:

$encoder = new mxCodec(); $encoder->encode($model);

like in javascript, but why does mxUtils::getXML or mxUtils::getPrettyXML not exist?

asked 09 Aug '12, 11:11

kburton's gravatar image

kburton
33
accept rate: 0%

edited 14 Aug '12, 13:58


Use the following code for now:

$enc = new mxCodec();
$xmlNode = $enc->encode($model);
$xml = addslashes(htmlentities(str_replace("\n", "
",
    $xmlNode->ownerDocument->saveXML($xmlNode))));
link

answered 10 Aug '12, 07:55

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×228
×5
×4
×1

Asked: 09 Aug '12, 11:11

Seen: 1,693 times

Last updated: 31 Dec '12, 17:09