Linked Questions

2 votes
1 answer
521 views

I wish to pass a xml node to a function by ref, and make change within the function. But seem the node's value couldn't be changed in this way. Example: <?php $str = '<data><name>foo&...
Paulinus Wong's user avatar
0 votes
1 answer
79 views

In a PHP script, I want to edit a node and its attributes. <config> <Week> <Monday from="18:00:00" to="8:00:00">true</Monday> <Tuesday from="18:00:00" ...
user2367868's user avatar
58 votes
18 answers
117k views

I have several identical elements with different attributes that I'm accessing with SimpleXML: <data> <seg id="A1"/> <seg id="A5"/> <seg id="A12"/> <seg id="...
TimTowdi's user avatar
  • 657
11 votes
4 answers
25k views

How can I edit the value's in a xml file using simpleXML ? I know how to create the file, but not how to edit the value in an existing file ?
Oliver Bayes-Shelton's user avatar
1 vote
3 answers
9k views

how to set text for a SimpleXMLElement in php?
user121196's user avatar
  • 31.2k
4 votes
6 answers
4k views

I need to print arbitrary SimpleXML objects in a specific manner, with special handling of attribute nodes. The problem is that SimpleXML elements and attributes seem to use exactly the same class, ...
Kornel's user avatar
  • 101k
5 votes
2 answers
14k views

I am trying to write a code where it will find a specific element in my XML file and then change the value of the text node. The XML file has different namespaces. Till now, I have managed to register ...
user1919's user avatar
  • 3,958
2 votes
2 answers
1k views

I am writing a function to decrypt the contents of a SimpleXML object in place. function xmlWalkerDecrypt(&$xmlObj, $aesKey) { if ($xmlObj->count()>0){ foreach($xmlObj as &$...
yumcha's user avatar
  • 63
0 votes
3 answers
365 views

I am trying to filter the results of an XML feed generated for Facebook. Currently, the feed looks like this <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:g="http:...
Argiris's user avatar
  • 189
-1 votes
3 answers
188 views

I have two arrays like: array (size=4) 0 => string '5' (length=1) 1 => string '4' (length=1) 2 => string '2' (length=1) 3 => string '2' (length=1) 3 => string '8' (length=1) and ...
ching's user avatar
  • 142
0 votes
2 answers
47 views

I have a DomElement <title> <language id="1" /> <language id="2" /> </title> I want to set the content of both languages $node=$pp->title foreach($node->language ...
Leif Neland's user avatar
  • 1,566