PHP Class Usps\XMLParser

Afficher le fichier Open project: vinceg/usps-php-api

Méthodes publiques

Méthode Description
createXML ( string $node_name, array $arr = [] ) : DOMDocument Convert an Array to XML.
init ( $version = '1.0', $encoding = 'UTF-8', $format_output = true ) Initialize the root XML node [optional].

Private Methods

Méthode Description
bool2str ( $v ) Get string representation of boolean value.
convert ( string $node_name, array $arr = [] ) : DOMNode Convert an Array to XML.
getXMLRoot ( ) Get the root XML node, if there isn't one, create it.
isValidTagName ( $tag ) Check if the tag name or attribute name contains illegal characters Ref: http://www.w3.org/TR/xml/#sec-common-syn.

Method Details

createXML() public static méthode

Convert an Array to XML.
public static createXML ( string $node_name, array $arr = [] ) : DOMDocument
$node_name string - name of the root node to be converted
$arr array - aray to be converterd
Résultat DOMDocument

init() public static méthode

Initialize the root XML node [optional].
public static init ( $version = '1.0', $encoding = 'UTF-8', $format_output = true )
$version
$encoding
$format_output