Re: XML_Functions
| From: | Guillaume Lecanu | Date: | Wed, 31 Mar 2004 23:32:19 +0000 |
| Subject: | Re: XML_Functions | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26908@lists.php.net to get a copy of this message | ||
Le mer 31/03/2004 à 22:15, Stephan Schmidt a écrit :
> Hi,
>
> > Can you explain me how to do this example with your package please ?
> >
> > $x->div(array ('class'=>'myDivClass'),
> > $x->h1("Hello").
> > $x->a(array('href'=>$url),
> > $x->span("World")
> > )
> > )
>
> I'd need to do some small adjustments, but it would be possible to do
> something like:
>
> $div = new stdClass;
> $div->attribs = array( 'class' => 'foo' );
> $div->a = new stdClass;
> $div->a->attribs = array( 'href' => '##' );
>
> And then create XML from the structure.
Humm, i see.. but i doubt this method is very easy to use.
If i suggest an HTML_Functions which extends the XML_Functions for
controls tags/attrib (and warns), do you think this package will be more
usefull ?
>
> Furthermore you should take a look at PHP5's simpleXML.
I have looked the doc, but i think this method is not simple to use..
>
> Stephan
>
>