Sitellite Application Framework
Class Tree         Index         All Elements

Class: SLiPWriter

Source Location: Program_Root/XML/SLiP/Writer.php

Class Overview


SLiPWriter is an XML to SLiP converter based on the XMLDoc and XMLNode callback functionality.


Author(s)

Version

  • 1.0, 2002-10-17, $Id: Writer.php,v 1.2 2005/07/06 15:30:56 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Methods


Inherited Variables

Inherited Methods


Class Details

[line 73]
SLiPWriter is an XML to SLiP converter based on the XMLDoc and XMLNode callback functionality.


1 <?php
2
3 $loader->import ('saf.Sloppy');
4
5 // load the converter
6 $loader->import ('saf.XML.SLiP.Writer');
7
8 $sloppy = new SloppyDOM ();
9
10 // create an instance of our converter
11 $slip = new SLiPWriter ();
12
13 $doc = $sloppy->parse ('<users>
14 <user type="admin">
15 <name>Lux</name>
16 <email>lux@simian.ca</email>
17 </user>
18 <user type="suit">
19 <name>Josh</name>
20 <email>josh@simian.ca</email>
21 </user>
22 </users>');
23
24 // bind the converter to the document object
25 $doc->propagateCallback ('_start', false, $slip);
26
27 // output SLiP document (note the ->root-> in there,
28 // that's so we don't get a little bit of <?xml version="1.0"...
29 // at the top of our SLiP document)
30 echo $doc->root->write ();
31
32 ?>




Tags:

access:  public
version:  1.0, 2002-10-17, $Id: Writer.php,v 1.2 2005/07/06 15:30:56 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Methods


method _start [line 87]

string _start( object $node, [integer $level = 0])

Callback method. A callback method always takes an XMLNode object as its first parameter, and the level (depth) into the XML tree we've gotten to as its second.



Tags:

access:  public


Parameters:

object   $node  
integer   $level  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:20:21 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2