as salam🙂

 

 

below is the comparison codes between YAML & XML:

XML:
<?php
$xml = <<<EOD
<user id=”babooey” on=”cpu1″>
<firstname>Bob</firstname>
<lastname>Abooey</lastname>
<department>adv</department>
<cell>555-1212</cell>
<address password=”xxxx”>ahunter@example1.com</address>
<address password=”xxxx”>babooey@example2.com</address>
</user>
EOD;

$data = new SimpleXMLElement($xml);

print_r($data);
?>

YAML:
<?php
$yaml = <<<EOD
babooey:
computer : cpu1
firstname: Bob
lastname: Abooey
cell: 555-1212
addresses:
– address: babooey@example1.com
password: xxxx
– address: babooey@example2.com
password: xxxx
EOD;

$data = syck_load($yaml);
print_r($data);
?>

#yamlxml

 

wassalam🙂

About fzfain88

islam. moderate. programmer. did all because allah. :)

2 responses »

  1. ksefaj says:

    C3GR56 xniqihzneilb, [url=http://zqfkkzrtvjfv.com/]zqfkkzrtvjfv[/url], [link=http://xqxvlkxqztbt.com/]xqxvlkxqztbt[/link], http://zimkdzzniehi.com/

  2. fzfain88 says:

    sorry i can’t understand your comment. but tq for reading here.🙂

As salam. Hi. Leave a Comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s