Jump to content

Aimar

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by Aimar

  1. OK, problem solved with this class: class SimpleXMLExtended extends SimpleXMLElement { public function addCData($cdata_text) { $node= dom_import_simplexml($this); $no = $node->ownerDocument; $node->appendChild($no->createCDATASection($cdata_text)); } }
  2. Acutally, it doesn't break syntax, so it's not a problem. Can't do that - .xml file is being loaded by flash website (.swf) - so best solution for it would be to save it with < > in .xml before flash reads it. Maybe there's another function in php which could save it without dropping < > chars? Or any other way around? Thanks for any hint.
  3. Hi there, I have small script like this: $lines->section[4]->page[2]->texts->pageText[1] = "<![CDATA[$new_value]]>"; file_put_contents('../25257_main.xml', $lines->asXml()); Problem is - it's not saving <![CDATA... - it converts "<" and ">" to entities ">" Is there any wayaround? I need it to be saved with < > Thanks in advance, Aimar
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.