# final class \SmartXmlParser
{ } ->

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

- Language: PHP
- Located at: lib/framework/plugins/lib_xml.php
- Package: Plugins:ConvertersAndParsers
- Namespace: \
- Class Name: SmartXmlParser
- Version: v.20231207
- Depends: extensions: PHP XML ; classes: Smart
- Hints: The XML Parser may handle UTF-8 (default) and ISO-8859-1 encodings
- Usage: dynamic object: (new Class())->method() - This class provides only DYNAMIC methods

## 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 16:53:45 +0000

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