# DOM Examples?

- Thread: https://externals.io/message/6831
- Original archive: https://news-web.php.net/php.internals/6831
- Started by Ken Tossell on 2004-01-07T23:48:08+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #6831 — Ken Tossell — 2004-01-07T23:48:08+00:00

URL: https://externals.io/message/6831#6831

Hey Internals,

Would anyone be able to write, or point me to, some examples for using the 
new DOM extension? I'm looking to do some documenting, but I need to know 
how to use our implementation first.

Thanks,
Ken

---

## #6834 — dharana — 2004-01-08T00:09:13+00:00

URL: https://externals.io/message/6831#6834 · In reply to: #6831

Hello Ken,

I started using the php5 new dom extension like this:

--
<?php
asort(get_class_methods(new domDocument));

foreach ($ar_methods as $method)
   echo $method.'<br />';
?>
--

I found the rest of the here:

	http://www.w3.org/TR/DOM-Level-2-Core/core.html

You can then load a real xml file and start inspecting the different 
classes (node, nodeList, etc).

I hope this helps,


Ken Tossell wrote:

> Hey Internals,
> 
> Would anyone be able to write, or point me to, some examples for using the 
> new DOM extension? I'm looking to do some documenting, but I need to know 
> how to use our implementation first.
> 
> Thanks,
> Ken
> 

-- 
dharana

This message represents the official view of the voices in my head.

---

## #6835 — Ken Tossell — 2004-01-08T00:28:12+00:00

URL: https://externals.io/message/6831#6835 · In reply to: #6834

> Hello Ken,
> I started using the php5 new dom extension like this:
> --
> <?php
> asort(get_class_methods(new domDocument));
> foreach ($ar_methods as $method)
>    echo $method.'<br />';
> ?>
> --

Ahh, thanks -- and to another reply I got. :)

I didn't know anything about that function. Wow.

Ken

---

## #6836 — Marcus Boerger — 2004-01-08T00:41:56+00:00

URL: https://externals.io/message/6831#6836 · In reply to: #6834

Hello dharana,

Thursday, January 8, 2004, 1:09:13 AM, you wrote:

> Hello Ken,

> I started using the php5 new dom extension like this:

> --
> <?php
> asort(get_class_methods(new domDocument));

> foreach ($ar_methods as $method)
>    echo $method.'<br />';
?>>
> --

> I found the rest of the here:

> 	http://www.w3.org/TR/DOM-Level-2-Core/core.html

> You can then load a real xml file and start inspecting the different 
> classes (node, nodeList, etc).

> I hope this helps,


> Ken Tossell wrote:

> > […]

> -- 
> dharana

> This message represents the official view of the voices in my head.


Funny :-)

what about this:

php -r 'foreach(get_declared_classes() as $c) echo "$c\n";'|grep dom|php -R 'reflection_class::export($argn);'
php -r 'foreach(get_declared_classes() as $c) if (!strncmp("dom",$c,3)) reflection_class::export($c);'



-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #6843 — Christian Stocker — 2004-01-08T05:47:35+00:00

URL: https://externals.io/message/6831#6843 · In reply to: #6831

Hi Ken

Here is some stuff for a start, as well

http://slides.bitflux.ch/phpconf2003/

examples are here

http://trash.chregu.tv/phpconf2003/examples/

chregu


> Hey Internals,
> 
> Would anyone be able to write, or point me to, some examples for using the 
> new DOM extension? I'm looking to do some documenting, but I need to know 
> how to use our implementation first.
> 
> Thanks,
> Ken
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  chregu@bitflux.ch  |  gnupg-keyid 0x5CE1DECB
