Child pages
  • cXmlReader & cXmlWriter

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The difference in this methods is simple. The load method loads xml from file and loadXML loads xml from given string.

After successfully loading of xml file you can handle it as DOMDocument(for further information see documentation for DOMDocument class).

Code Block
languagephp
linenumberstrue
$pathToXml = "path/to/some/xml/file/example.xml";
$xmlAsString = "<?xml version="1.0" encoding="UTF-8"?>...";

$xmlReader = new cXmlReader();

$domDocument = $xmlReader->loadXML($xmlAsString);
or
$domDocument = $xmlReader->load($pathToXml);

...