PHP -zelfstudie

PHP HOME PHP-intro PHP-installatie PHP-syntaxis PHP-opmerkingen PHP-variabelen PHP-echo / afdrukken PHP-gegevenstypen PHP-strings PHP-nummers PHP-wiskunde PHP-constanten PHP-operators PHP Als...Anders...Anders PHP-switch PHP-loops PHP-functies PHP-arrays PHP Superglobals PHP RegEx

PHP- formulieren

PHP-formulierverwerking PHP-formuliervalidatie PHP-formulier vereist URL/e-mail van PHP-formulier PHP-formulier voltooid

PHP Geavanceerd

PHP-datum en tijd PHP opnemen PHP-bestandsverwerking PHP-bestand openen/lezen PHP-bestand maken/schrijven PHP-bestand uploaden PHP-cookies PHP-sessies PHP-filters PHP-filters geavanceerd PHP-callback-functies PHP JSON PHP-uitzonderingen

PHP OOP

PHP Wat is OOP PHP-klassen/objecten PHP-constructor PHP-vernietiger PHP-toegangsmodificaties PHP-overerving PHP-constanten PHP abstracte lessen PHP-interfaces PHP-kenmerken PHP statische methoden Statische eigenschappen van PHP PHP-naamruimten PHP-iterables

MySQL- database

MySQL-database MySQL Connect MySQL DB maken MySQL-tabel maken MySQL Gegevens invoegen MySQL Laatste ID ophalen MySQL Meerdere invoegen MySQL voorbereid MySQL Gegevens selecteren MySQL Waar MySQL Bestel op MySQL Gegevens verwijderen MySQL-updategegevens MySQL-limietgegevens

PHP XML

PHP XML-parsers PHP SimpleXML-parser PHP SimpleXML - Get PHP XML Expat PHP XML DOM

PHP - AJAX

Ajax-intro AJAX PHP AJAX-database AJAX XML Live zoeken in Ajax Ajax-peiling

PHP- voorbeelden

PHP-voorbeelden PHP-compiler PHP-quiz PHP-oefeningen PHP-certificaat

PHP- referentie

PHP-overzicht PHP-array PHP-agenda PHP-datum PHP-map PHP-fout PHP-uitzondering PHP-bestandssysteem PHP-filter PHP FTP PHP JSON PHP-sleutelwoorden PHP Libxml PHP-e-mail PHP-wiskunde PHP Diversen PHP MySQLi PHP-netwerk PHP-uitvoercontrole PHP RegEx PHP SimpleXML PHP-stream PHP-string Beheer van PHP-variabelen PHP XML-parser PHP-zip PHP-tijdzones

PHP SimpleXML- functies


PHP SimpleXML Introductie

SimpleXML is een extensie waarmee we eenvoudig XML-gegevens kunnen manipuleren en ophalen.

SimpleXML biedt een gemakkelijke manier om de naam, attributen en tekstuele inhoud van een element te krijgen als u de structuur of lay-out van het XML-document kent.

SimpleXML verandert een XML-document in een gegevensstructuur die u kunt doorlopen, zoals een verzameling arrays en objecten.


Installatie

Vanaf PHP 5 maken de SimpleXML-functies deel uit van de PHP-core. Er is geen installatie vereist om deze functies te gebruiken.


PHP SimpleXML-functies

Function Description
__construct() Creates a new SimpleXMLElement object
__toString() Returns the string content of an element
addAttribute() Appends an attribute to the SimpleXML element
addChild() Appends a child element the SimpleXML element
asXML() Returns a well-formed XML string (XML version 1.0) from a SimpleXML object
attributes() Returns the attributes/values of an element
children() Returns the children of a specified node
count() Counts the children of a specified node
getDocNamespaces() Returns the namespaces declared in document
getName() Returns the name of an element
getNamespaces() Returns the namespaces used in document
registerXPathNamespace() Creates a namespace context for the next XPath query
saveXML() Alias of asXML()
simplexml_import_dom() Returns a SimpleXMLElement object from a DOM node
simplexml_load_file() Converts an XML document to an object
simplexml_load_string() Converts an XML string to an object
xpath() Runs an XPath query on XML data

PHP SimpleXML iteratiefuncties

Function Description
current() Returns the current element
getChildren() Returns the child elements of the current element
hasChildren() Checks whether the current element has children
key() Returns the XML tag name of the current element
next() Moves to the next element
rewind() Rewinds to the first element
valid() Checks whether the current element is valid