Re: XML_Functions
| From: | Guillaume Lecanu | Date: | Sat, 03 Apr 2004 03:34:45 +0000 |
| Subject: | Re: XML_Functions | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26985@lists.php.net to get a copy of this message | ||
Le sam 03/04/2004 à 02:12, Alan Knowles a écrit :
> >
> >>- In addition to returning strings, It would nice if it could return
> >>XML_Tree / HTML_Template_Flexy_Element / HTML_Common ... etc. elements
> >>as well:
> >
> > Why not, but this make dependecies on my packages..
>
> very much optional deps... - existing package would work pefectly well
> without FastCreate...
> and FastCreate would work perfectly well without them...
I have made a new XML_FastCreate package :)
Now, i use directly the XML_Tree structure, all elements are
XML_Tree_Node objects.
And i have add the support of a DTD. If precised, when you run
$x->toXML(), the package make warnings if you have not respected the DTD
file.
Example :
$x = new XML_FastCreate('xhtml1-strict.dtd');
$x->html(
$x->head(
$x->title('Examples of XML_FastCreate'),
),
$x->body(
$x->div(
$x->h1("Examples of PEAR::XML_FastCreate package"),
// Each elements are seperated by comma
$x->ul(
$x->li(
$x->span("Make valid XML document easyly")
),
$x->li(
$x->span("Add control by DTD (with PEAR::XML_DTD)")
),
$x->li(
$x->span("Each element are XML_Tree_Node object")
)
)
),
)
);
$x->toXML();
It's very simple :)
I have 2/3 bugs to fix and i'll propose this package.
But for now, i'm late (4h30 in France) so good night :)
Regards,
PS: Thanks Alan for all your advices about this package !
>
> Regards
> Alan
>
>
>
>
> --
> Can you help out?
> Need Consulting Services or Know of a Job?
> http://www.akbkhome.com