PHP Doku:: Reads the contents of the current node as an string - xmlreader.readstring.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzXML-ManipulationXMLReaderThe XMLReader classXMLReader::readString

Ein Service von Reinhard Neidl - Webprogrammierung.

The XMLReader class

<<XMLReader::readOuterXML

XMLReader->setParserProperty>>

XMLReader::readString

(PHP 5 >= 5.2.0)

XMLReader::readStringReads the contents of the current node as an string

Beschreibung

string XMLReader::readString ( void )

Reads the contents of the current node as an string.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the content of the current node as a string. Empty string on failure.

Anmerkungen

Achtung

Diese Funktion ist nur verfügbar, wenn PHP mit libxml 20620 oder später kompiliert wurde.

Siehe auch


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
Michael Rusch
18.05.2009 19:27
For those who, like me, are having trouble figuring out the difference between getString() an getInnerXML(), the difference is that getString() does NOT include markup.  So, for:

<foo>bar<baz>Hello, world!</baz></foo>

getString() on the <foo> node would return

bar Hello, world!

whereas getInnerXML() would return

bar<baz>Hello, world!</baz>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)