Simple Xpath extraction 3 with PHP 5
NOT DONE YET !! Wait a bit - can't make XSL deal with DomNodes :(
This example grabs an XML file, extracts certain elements (i.e. exercice elements) and then will apply an XSLT stylesheet. It will not work with php 4.x or PHP 5 without XML support installed.
So this makes use of:
- XXVI. DOM Functions (NOT DOM XML of php 4)
- CXXXII. XSL functions (NOT XSLT Functions pf Php4)
Here is the kind of input this example can deal with:
<student>
<exercises>
<exercise id="" creation-day="28" creation-month="11" creation-year="02" mod-day="" mod-month="" mod-year="" mod-by="" version="" status="draft">
<staf no="14" ex-number=" 1a "/>
<title>Home page personnelle</title>
<url>http://tecfa.unige.ch/perso/staf/lattion/welcome.html</url>
<description>créer sa homepage en xhtml</description>
<report report-url="http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex1/comment.html"/>
</exercise>
.......
<exercises>
<student>
See simple-xpath1 or 2 for xpath part, i.e. (go back.)
The source (simple-xpath3.phps or simple-xpath3.text is in this same directory. It is freeware :)
- exercise: object(DOMElement)#5 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
NULL
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(141) "
Home page personnelle
http://tecfa.unige.ch/perso/staf/lattion/welcome.html
créer sa homepage en xhtml
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(141) "
Home page personnelle
http://tecfa.unige.ch/perso/staf/lattion/welcome.html
créer sa homepage en xhtml
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#16 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#6 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(125) "
Work Page
http://tecfa.unige.ch/staf/staf-i/lattion/
Mise en place de la page "travaux"
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(125) "
Work Page
http://tecfa.unige.ch/staf/staf-i/lattion/
Mise en place de la page "travaux"
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#17 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#7 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(139) "
Personnage et bureau MOO
http://tecfa.unige.ch:7778/objbrowse/6949/
créer son identité sur TecfaMOO
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(139) "
Personnage et bureau MOO
http://tecfa.unige.ch:7778/objbrowse/6949/
créer son identité sur TecfaMOO
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#16 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#8 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(4)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(248) "
Projet "logiciel de classement de dvd "
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/Projet_dtd.html
Projet d'un logiciel de classement de dvd avec base de donnée commune sur le web. Première étape: la dtd
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(248) "
Projet "logiciel de classement de dvd "
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/Projet_dtd.html
Projet d'un logiciel de classement de dvd avec base de donnée commune sur le web. Première étape: la dtd
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#17 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#9 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(243) "
Premiers Pas Avec XML
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/welcome.html
Créer un dispositif affichant un contenu sous format XML. C'est la première étape du logiciel de classement de dvd
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(243) "
Premiers Pas Avec XML
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/welcome.html
Créer un dispositif affichant un contenu sous format XML. C'est la première étape du logiciel de classement de dvd
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#16 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#10 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(191) "
Programmation PHP
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex3/welcome.html
Création d'un quizz on-line portant sur l'origine des superstitions.
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(191) "
Programmation PHP
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex3/welcome.html
Création d'un quizz on-line portant sur l'origine des superstitions.
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#17 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#11 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(203) "
JavaScript
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex4/welcome.html
Reprise du quizz de l'exercice précédant et mise au point d'un feedback en Javascript.
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(203) "
JavaScript
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex4/welcome.html
Reprise du quizz de l'exercice précédant et mise au point d'un feedback en Javascript.
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#16 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#12 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(4)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(164) "
Exposé
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex7/welcome.html
Exposé traitant de l'utilité des standards du Web.
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(164) "
Exposé
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex7/welcome.html
Exposé traitant de l'utilité des standards du Web.
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#17 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
- exercise: object(DOMElement)#13 (27) {
["schemaTypeInfo"]=>
NULL
["tagName"]=>
string(8) "exercise"
["className"]=>
string(0) ""
["id"]=>
string(0) ""
["firstElementChild"]=>
string(22) "(object value omitted)"
["lastElementChild"]=>
string(22) "(object value omitted)"
["childElementCount"]=>
int(5)
["previousElementSibling"]=>
string(22) "(object value omitted)"
["nextElementSibling"]=>
string(22) "(object value omitted)"
["nodeName"]=>
string(8) "exercise"
["nodeValue"]=>
string(235) "
VRML
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex5/welcome.html
Création d'un page VRML regroupant tous les liens représentatifs de la volée Iris: Homepages, Workpages, Blogs et Portails.
"
["nodeType"]=>
int(1)
["parentNode"]=>
string(22) "(object value omitted)"
["parentElement"]=>
string(22) "(object value omitted)"
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
string(22) "(object value omitted)"
["lastChild"]=>
string(22) "(object value omitted)"
["previousSibling"]=>
string(22) "(object value omitted)"
["nextSibling"]=>
string(22) "(object value omitted)"
["attributes"]=>
string(22) "(object value omitted)"
["isConnected"]=>
bool(true)
["ownerDocument"]=>
string(22) "(object value omitted)"
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
string(8) "exercise"
["baseURI"]=>
string(42) "/web/guides/php/examples/xpath/student.xml"
["textContent"]=>
string(235) "
VRML
http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex5/welcome.html
Création d'un page VRML regroupant tous les liens représentatifs de la volée Iris: Homepages, Workpages, Blogs et Portails.
"
}
- exercise node name = exercise
dom fragment: object(DOMDocument)#16 (40) {
["doctype"]=>
NULL
["implementation"]=>
string(22) "(object value omitted)"
["documentElement"]=>
NULL
["actualEncoding"]=>
NULL
["encoding"]=>
NULL
["xmlEncoding"]=>
NULL
["standalone"]=>
bool(false)
["xmlStandalone"]=>
bool(false)
["version"]=>
string(3) "1.0"
["xmlVersion"]=>
string(3) "1.0"
["strictErrorChecking"]=>
bool(true)
["documentURI"]=>
NULL
["config"]=>
NULL
["formatOutput"]=>
bool(false)
["validateOnParse"]=>
bool(false)
["resolveExternals"]=>
bool(false)
["preserveWhiteSpace"]=>
bool(true)
["recover"]=>
bool(false)
["substituteEntities"]=>
bool(false)
["firstElementChild"]=>
NULL
["lastElementChild"]=>
NULL
["childElementCount"]=>
int(0)
["nodeName"]=>
string(9) "#document"
["nodeValue"]=>
NULL
["nodeType"]=>
int(9)
["parentNode"]=>
NULL
["parentElement"]=>
NULL
["childNodes"]=>
string(22) "(object value omitted)"
["firstChild"]=>
NULL
["lastChild"]=>
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["isConnected"]=>
bool(true)
["ownerDocument"]=>
NULL
["namespaceURI"]=>
NULL
["prefix"]=>
string(0) ""
["localName"]=>
NULL
["baseURI"]=>
NULL
["textContent"]=>
string(0) ""
}
dom fragment's kids: DOMNodeList Object
(
[length] => 0
)
html fragment: NULL
D.K.S.
Last modified: Fri Jan 21 12:30:15 MET 2005