Smart.Framework Logo

final class \SmartXmlParser
{ } ->

Class: SmartXmlParser - Create a PHP Array from simple XML structures.
XML tag attributes are supported but not parsed.


class Methods

public function __construct ( string $mode = "simple", string $encoding = "" ) {} @ 
public function format ( string $xml_str, bool $preserve_whitespace = false, bool $log_parse_err_warns = false, bool $use_strict_validation = false, bool $remove_xml_header = false ) {} -> STRING
public function transform ( string $xml_str, bool $log_parse_err_warns = false ) {} -> ARRAY

class Properties


class Constants


Sample code: PHP

<?php

//-- Sample usage:
   $arr = (new SmartXmlParser())->transform('<xml><data>1</data></xml>'); // [OK]
   print_r($arr);
   //--

// #end php code


documentation generated on: 2024-12-16 17:13:19 +0000


Smart.Framework © 2009-2024 unix-world.org