nope, not a case sensitive issue.
Oliver
-----Original Message-----
From: nig...@us...
[mailto:nig...@us...]
Sent: dinsdag 25 september 2001 12:46
To: us...@li...
Subject: [phpXML] Re: [phpXML] RE: [phpXML] Answers to Olivers three
questions
Hmm, damn. First bug.
Change to "_setContent" It must just be a case sensitive issue.
Nigel
===========================
For the most recent version of phpxml, V1.N.X, and an archive of this list
visit: http://www.sourceforge.net/projects/phpxmldb
<http://www.sourceforge.net/projects/phpxmldb>
----- Original Message -----
From: o.t...@ab... <mailto:o.t...@ab...>
To: us...@li... <mailto:us...@li...>
Sent: Tuesday, September 25, 2001 9:14 AM
Subject: [phpXML] RE: [phpXML] Answers to Olivers three questions
I get this message:
Fatal error: Call to undefined function: _setcontent() in XPath.class.php on
line 903
What to do?
Oliver
-----Original Message-----
From: nig...@us...
<mailto:nig...@us...>
[mailto:nig...@us...]
Sent: dinsdag 25 september 2001 3:36
To: us...@li... <mailto:us...@li...>
Subject: [phpXML] Answers to Olivers three questions
The first thing you need to do is go get the latest version, ie 1.N.5.
Available from phpxml's 1.N.X's home at
http://www.sourceforge.net/projects/phpxmldb
<http://www.sourceforge.net/projects/phpxmldb>
How do I save an altered XML document using PHPXML?
Use the exportToFile() method
function exportToFile($fileName, $absoluteXPath='', $xmlHeader='<?xml
version="1.0"?>')
http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#exp
ortToFile
<http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#ex
portToFile>
How to add a node to an XML file. add_node does not seem to work.
Please advise.
Use the appendData() method
function appendData($absoluteXPath, $value)
Note that the parameter is an "absolute X Path" expression, not just any old
x path expression, so it must address 1 unique node. ie
"/root[1]/records[4]" not "/root/record[4]".
http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#app
endData
<http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#ap
pendData>
How do I get attributes by the XPath function in phpxml?
I want to do something like in this code:
$results =
$xml->evaluate("//users/user[@us_workspace=$workspace]/product[@us_prname=$p
roduct]");
file://Display <file://Display> user in list
$attributes = array();
foreach ($results as $users) {
file://username <file://username>
$attributes = $xml->get_attributes("parent::".$users);
Use the getAttributes method
function getAttributes($absoluteXPath, $attribute = '')
Note again the absolute X path expression. If you pass an array in, then it
won't work. If you want just the one attribute, then you can specify it,
otherwise you get all the attributes in an array.
http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#get
Attributes
<http://www.carrubbers.org/scripts/php/xmlphp/doc/PhpXmlDocumentation.php#ge
tAttributes>
Cheers
Nigel
===========================
For the most recent version of phpxml, V1.N.X, and an archive of this list
visit: http://www.sourceforge.net/projects/phpxmldb
<http://www.sourceforge.net/projects/phpxmldb>
--
This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |