DOM? (was Re: [PHP4BETA] Php/Xml)
| From: | Ly) Vuong | Date: | Wed, 01 Mar 2000 18:44:47 +0000 |
| Subject: | DOM? (was Re: [PHP4BETA] Php/Xml) | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11266@lists.php.net to get a copy of this message | ||
Sorry for changing the subject line.
Do you know where can I find the documentation in regard of using the
DOM tree via PHP? I see the XML part in the document, but could not find
anything about DOM!
Much appreciated,
Ly Vuong
---
Paul DuBois wrote:
>
> At 12:36 PM -0500 03-01-2000, Vincent Stoessel wrote:
> >I have a question about using the new xml features.I've been
> >doing some reading about xml (the material can get complicated).
> >What I want to know is this:
> >using php/xml or any other method can I create custom tags like
> >
> ><headline>Dynamically generated headline</headline>
> >that would be the equivelent of
> >
> >echo "<center><h1>" .$mysqlrow["Headline"]
> >."</h1></center>";
> >
> >The advantage of the first method is that code is a little
> >easier to read and manipulate in their documents. Am I totally
> >off base here?
> >
> >Please excuse the cross post.
>
> Do you mean "given an XML document, can I apply it as a formatting
> specification for each row I yank out of a database?", the answer
> is yes. One way would be to take the XML and convert it to DOM
> format (This would be PHP4 only) to get a DOM tree. Then for
> each row of your query, traverse the tree and associate your
> HTML formatting and/or row values with specific XML elements.
>
> --
> Paul DuBois, paul@snake.net
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net