-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
SPL have been aorund for a while now, and it is a great tool for a php
programmer. However, can anyone point me towards more detailed
php-documentation about how to use the SPL Classes?
I can only find http://www.php.net/~helly/php/ext/spl which is ni
I totally missed that explanation on w3c.
Thanxs, now it works
/Erik
Rob wrote:
Erik Franzén wrote:
I did a typo in the threads post.
The dtd is:
but it gives the warning when DomDocument::validate() is called:
Warning: Syntax of value for attribute S_iSectionId of
I did a typo in the threads post.
The dtd is:
but it gives the warning when DomDocument::validate() is called:
Warning: Syntax of value for attribute S_iSectionId of
CMAES_Model_DbSection is not valid in
Sorry, I copied the wrong DTD into the post.
The DTD is the following:
Here is the code example and result again:
$oDomDtd = $oDomImp->createDocumentType('Document', '',
'D:/CMAES/Src/dbtree.dtd');
// Creates a DOMDocument instance
$oDom = $oDomImp->createDocument("", "Document", $oDomDt
Have tried the following code:
$oDomDtd = $oDomImp->createDocumentType('Document', '',
'D:/CMAES/Src/dbtree.dtd');
// Creates a DOMDocument instance
$oDom = $oDomImp->createDocument("", "Document", $oDomDtd);
// Set other properties
$oDom->encoding = 'iso-8859-1';
$oElement = $oDom->createEl
My real problem is that I am building a XML tree and I want to use the
getElementbyId method on the tree directly.
It would be very nice if it is possible to do it without including a
external dtd, since it takes some time to load every time.
The page http://blog.bitflux.ch/wiki/GetElementByI
apparently, that is not the case.
/Erik
James Benson wrote:
Learn DTD and how it works first then you will know :-)
A DTD is contained in an external file and not in XML, so you would
create a DTD file then link it from the XML like so,
Erik Franzén wrote:
The code below lacks the part
The code below lacks the part where the folling DTD attribute is
created:
How can I create the above DTD attribute in the code below?
createDocumentType('document', null, null);
// Creates a DOMDocument instance
$oDom = $oDomImp->createDocument("", "", $oDomDtd);
// Set other properties
$oDo
I have run into this behavior on several sites:
$dom->validate('books.dtd');
But according to the docs, the method it is defined
class DOMDocument {
bool validate ( void )
}
Is the dtd (file?) parameter deprecated?
/Erik
Just tested, $dom->validate('books.dtd') generates the warning
"
I have run into this behavior on several sites:
$dom->validate('books.dtd');
But according to the docs, the method it is defined
class DOMDocument {
bool validate ( void )
}
Is the dtd (file?) parameter deprecated?
/Erik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
According to the php docs, the method DomDocument->getElementById() will
not work unless the document is validated using a DTD (not schema):
"According to the DOM standard this requires a DTD which defines the
attribute ID to be of type ID. You need to validate your document with
DOMDocument->
Of course you are right. I was fooled by this page:
http://www.wiki.cc/php/RecursiveIterator
class RecursiveArrayIterator extends ArrayIterator implements
RecursiveIteratorIterator
{
function hasChildren()
{
return is_array($this->current());
}
function getChildren()
I have the following class
class CMAES_DomIterator implements RecursiveIteratorIterator
{
}
When I am instanciating the class I am getting the following error:
Fatal error: CMAES_DomIterator cannot implement
RecursiveIteratorIterator - it is not an interface ...
Does not PHP 5.0.5 suppo
ling example
unsetting a will only kill a, b and c will still be "alive".
setting a to null will kill c but not b
/Erik
Torsten Roehr wrote:
"Erik franzén" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Can anuyone describe this error?
Compile Error: E:\Source
Can anuyone describe this error?
Compile Error: E:\Source\CMAES\src\include\dom.inc.php line 67 -
Declaration of CMAES_DOM_Node_List::item() must be compatible with that
of CMAES_DOM_Node_List_Interface::item()
// {{{ interface CMAES_DOM_Node_List
/**
*
* @access public
*/
interface CMAES_DO
Is it possible to determine if a property inside a object is public,
protected or private in PHP 5?
/Erik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanxs for the help Curt!! Thats a tricky solution, but it works...
This is almost motivating a new method in PHP5: $foo->__destroy() which
will destroy the object once and for all... :)
/Erik
Curt Zirzow wrote:
* Thus wrote Erik Franzn:
$oObjectB[$i] = &$oObjectA[$i];
The above statement does no
$oObjectB[$i] = &$oObjectA[$i];
The above statement does not matter, because in PHP5 "objects are
referenced by handle, and not by value".
Look at this example:
$a = new foo();
$b = $a;
unset($a);
var_dump($b);
>?
This will output:
object(foo)#1 (0) {
}
The object is not destroyed!? How do I destr
I am correcting myself...
$oObjectA = array();
$oObjectB = array();
for($i=0;$i<2;$i++) {
$oObjectA[$i] = new foo();
$oObjectB[$i] = $oObjectA[$i];
}
unset($oObjectA[1]);
var_dump($oObjectA);
var_dump($oObjectB);
?>
will output:
array(1) {
[0]=>
object(foo)#1 (0) {
}
}
array(2) {
[0]
See the following example:
How do I remove an element in the oObjectA array without destroying the
object? I do not want to clone any object.
If I call unset($oObjectA[3]), the object will also be destroyed.
apparently $oObjectB[3] is also destroyed?
/Erik
--
PHP General Mailing List (http://w
The docs for PHP5 and dom xml is not written yet, so I tried to find
information about load and save methods on the w3c site, but I didn't
find anything.
What's is the PHP5 eqvivalent to domxml_open_mem in PHP4?
/Erik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
Say the you are going to create a simple forum and you want to have a number
of classes:
Class Sql - handles the DB interface
Class User - handles users
Class Messages - handles messages
When you are writing the code, you first creates a new sql object in order
to read or write data from or to th
s about (for an example) private
members?
"Erik FranzéN" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> After I posted the first message, I read something about PHP 5 at
> www.zend.com and suspected that is was about the new Zend E
x27;m longing for it... :)
"Rasmus Lerdorf" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> That was never the plan. It is scheduled for PHP 5 sometime in the next
> 6-12 months.
>
> -Rasmus
>
> On Tue, 24 Dec 2002
I believed that PHP V4.3 should include the Zend engine version 2 since
there was two alpha releases for PHP-4.3.0 with Zend engine version 2
-PHP-4.3.0-dev-zend2-win32-alpha1
-PHP-4.3.0-dev-zend2-win32-alpha2
I'm waiting for Zend engine version 2. Where could I read information about
future rel
25 matches
Mail list logo