03-31-2008, 08:39 AM
|
#2 (permalink)
|
|
The Contributor
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
|
Well.
Simple usage of XML is - you read data from it, you can structure it how you like.
For using php in XML file - sure - but you must use eval() for that code to be executed.
XML in a PHP file - XML must be in a string
PHP Code:
<?php
$xml = "
<?xml version="1.0" encoding="utf-8"?>
<books>
<bookInfo>
<id>12</id>
<name>The Test Name Of A Book</name>
<price>18,45</price>
</bookInfo>
</books>
";
?>
Parsing in now real easy using the PHP5s DOM or XPath.
Can you provide more detailed question :) Hope this cleared some things.
__________________
Back from sysadmins to the programmers.
|
|
|