SORU
11 EYLÜL 2010, CUMARTESİ


SimpleXml dizeye

PHP simpleXMLElement dize yapar herhangi bir işlevi var mı?

CEVAP
11 EYLÜL 2010, CUMARTESİ


Bunu başarmak için SimpleXMLElement::asXML() yöntemi kullanabilirsiniz:

$string = "<element><child>Hello World</child></element>";
$xml = new SimpleXMLElement($string);

// The entire XML tree as a string:
// "<element><child>Hello World</child></element>"
$xml->asXML();

// Just the child node as a string:
// "<child>Hello World</child>"
$xml->child->asXML();

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • EEVblog

    EEVblog

    4 NİSAN 2009
  • Nick Pitera

    Nick Pitera

    8 NİSAN 2006
  • TheXiaxue

    TheXiaxue

    3 AĞUSTOS 2009