Login   Register  
PHP Classes
elePHPant
Icontem

File: myEngine/sample.xml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tereshchenko Andrey  >  myEngine  >  myEngine/sample.xml  >  Download  
File: myEngine/sample.xml
Role: Auxiliary data
Content type: text/plain
Description: XML example
Class: myEngine
Illustration of use XML/XSLT technology with PHP.
Author: By
Last change: -
Date: 2004-05-23 03:47
Size: 1,655 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="Windows-1251"?>
<?xml-stylesheet href="sample.xsl" type="text/xsl"?>
<books>
  <?php
    // Initialize global variable
    global $id;
    $id = 1;
  ?>
  <book id="php: return $id++;">
    <title><b>Pierre: The Ambiguities</b></title>
    <author><i>Sophocles</i></author>
    <price>9.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>Heart of Darkness</b></title>
    <author><i>Joseph Conrad</i></author>
    <price>12.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>Arrowsmith</b></title>
    <author><i>Sinclair Lewis</i></author>
    <price>8.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>Oedipus Rex</b></title>
    <author><i>Sophocles</i></author>
    <price>8.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>The Secret Sharer and Other Stories</b></title>
    <author><i>Joseph Conrad</i></author>
    <price>13.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>The Republic</b></title>
    <author><i>Plato</i></author>
    <price>12.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>The Republic</b></title>
    <author><i>Plato</i></author>
    <price>15.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>Inside Microsoft Windows CE</b></title>
    <author><i>John Murray</i></author>
    <price>29.99</price>
  </book>
  <book id="php: return $id++;">
    <title><b>Pragmatism</b></title>
    <author><i>William James</i></author>
    <price>15.99</price>
  </book>
  <?php return myEngine::run('sample2.php'); ?>
</books>