אזהרה
|
רכיב
זה
הוא
ניסיוני
.
כלומר
,
התנהגות
הפונקציות,שמות
הפונקציות
ובאופן
כללי
כל
מה
שמתועד
כאן
עשוי
להשתנות
בהפצה
עתידית
של
PHP
ללא
התרעה
.
ראה
הוזהרת
,
השימוש
ברכיב
זה
על
אחריותך
בלבד
.
|
The
domxml
extension
has
been
overhauled
in
PHP
Version
4.3.0
in
favour
of
a
better
compliance
of
the
DOM
standard
.
The
extension
still
contains
many
old
functions
,
but
they
should
not
be
used
anymore
.
Especially
those
non
object
oriented
functions
should
be
avoided
.
Currently
this
tree
should
be
considered
read-only
-
you
can
modify
it
but
this
would
not
make
any
sense
since
DomDocument_dump_mem(
)
cannot
be
applied
to
it
.
Therefore
,
if
you
want
to
read
an
XML
file
and
write
a
modified
version
use
the
DomDocument_create_element(
)
,
DomDocument_create_text_node(
)
,
set_attribute(
)
,
etc
.
and
finally
DomDocument_dump_mem(
)
functions
.
This
extension
make
use
of
the
GNOME
xml
library
.
You
will
need
at
least
libxml-2.2.7
.
This
extension
is
only
available
if
PHP
was
configured
with
--with-dom=[
DIR
]
.
There
a
quite
some
functions
which
do
not
fit
into
the
DOM
standard
and
should
not
be
used
anymore
as
listed
in
the
following
table
.
The
function
DomNode_append_child(
)
has
changed
its
behaviour
.
It
now
actually
adds
a
child
and
not
a
sibling
.
If
this
breaks
your
application
use
the
non
DOM
function
DomNode_append_sibling(
)
.
טבלה
1
.
Deprecated
functions
and
its
replacements
These
constants
are
defined
by
this
extension
,
and
will
only
be
available
when
the
extension
has
either
been
compiled
into
PHP
or
dynamically
loaded
at
runtime
.
The
API
of
the
module
follows
the
DOM
Level
2
standard
as
close
as
possible
.
Consequently
the
API
is
fully
object
oriented
.
Though
the
API
is
object
oriented
there
are
many
functions
which
can
be
called
in
a
non-object
oriented
way
by
passing
the
object
to
operate
on
as
the
first
argument
.
These
function
are
mainly
to
retain
compatibilty
to
older
versions
of
the
extension
but
are
not
encouraged
to
use
anymore
in
new
developments
.
This
API
differs
from
the
official
DOM
API
in
two
points
.
First
,
all
class
attributes
are
implemented
as
functions
with
the
same
name
and
secondly
the
function
names
follow
the
PHP
naming
convention
.
Classes
with
an
equivalent
in
the
DOM
Standard
are
named
DOMxxx
.
DomComment
is
derived
from
DomCData
Many
examples
in
this
reference
require
a
xml
string
.
Instead
of
repeating
this
string
in
any
example
it
will
be
put
into
a
file
and
be
included
by
each
example
.
You
could
also
create
an
xml
document
read
it
with
DomDocument_open_file(
)
.
דוגמה
1
.
Include
file
example.inc
with
xml
string
|