9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I was hoping someone could recommend a good book for awk. Maybe an online class? (1 Reply)
Discussion started by: Xterra
1 Replies
2. AIX
Please i searching a book
which covering system administration of aix7 or 6
:lvm,virtualization,fs,etc
Ebook and amazon ok.
Do you know something good?
Thanks (1 Reply)
Discussion started by: Linusolaradm1
1 Replies
3. Red Hat
Hi,
Can any one suggest me which book will be good for learning Linux server admin. I am new to it and trying for interview preparation.
Thanks (2 Replies)
Discussion started by: chetansingh23
2 Replies
4. What is on Your Mind?
On the basic concepts of programming. I mean I am 100% self taught so I need a book to fix all my bad habits and misconceptions. I mean I want a solid book over the basics. Explains what an array is, a string, variable, stacks, and so forth.
I only know how to write code in shell,... (7 Replies)
Discussion started by: tlarkin
7 Replies
5. Red Hat
Hey friends Anyone tell me the best book for learning RHEL5 from basic to master including everything that we can do with microsoft windows and server.
Does anyone know any good institute for red hat linux server in delhi,india (1 Reply)
Discussion started by: neerajrawat1
1 Replies
6. BSD
Hi Guys,
I need some help in getting a good book that describes the internals of the freeBSD OS, like the architecure, the process and memory management, etc..
I have some book which is named : the design and implementation of the freeBSD operating system, but I feel it's somewhat... (2 Replies)
Discussion started by: marwan
2 Replies
7. Programming
Hello there,
My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64.
It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386).
The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies
8. Solaris
Hi everybody
I a new one
And I have just wanted to research on Sun Solaris
So can you help me what e-book to read ( and if can you give me the
direct address to load )
Thks so much (3 Replies)
Discussion started by: iwbasts
3 Replies
9. News, Links, Events and Announcements
http://www.nvidia.com/content/drivers/drivers.asp
I know what I am doing this weekend!
I live life on the edge, baby! (0 Replies)
Discussion started by: auswipe
0 Replies
DOMDOCUMENT.GETELEMENTBYID(3) 1 DOMDOCUMENT.GETELEMENTBYID(3)
DOMDocument::getElementById - Searches for an element with a certain id
SYNOPSIS
public DOMElement DOMDocument::getElementById (string $elementId)
DESCRIPTION
This function is similar to "DOMDocument::getElementsByTagName" but searches for an element with a given id.
For this function to work, you will need either to set some ID attributes with "DOMElement::setIdAttribute" or a DTD which defines an
attribute to be of type ID. In the later case, you will need to validate your document with "DOMDocument::validate" or DOMDocument::$vali-
dateOnParse before using this function.
PARAMETERS
o $elementId
- The unique id value for an element.
RETURN VALUES
Returns the DOMElement or NULL if the element is not found.
EXAMPLES
Example #1
DOMDocument::getElementById() Example
The following examples use book.xml which contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title, author+, xhtml:blurb?)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT blurb (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ATTLIST books xmlns CDATA #IMPLIED>
<!ATTLIST books xmlns:xhtml CDATA #IMPLIED>
<!ATTLIST book id ID #IMPLIED>
<!ATTLIST author email CDATA #IMPLIED>
]>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<books xmlns="http://books.php/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<book id="php-basics">
<title>PHP Basics</title>
<author email="jim.smith@basics.php">Jim Smith</author>
<author email="jane.smith@basics.php">Jane Smith</author>
<xhtml:blurb><![CDATA[
<p><em>PHP Basics</em> provides an introduction to PHP.</p>
]]></xhtml:blurb>
</book>
<book id="php-advanced">
<title>PHP Advanced Programming</title>
<author email="jon.doe@advanced.php">Jon Doe</author>
</book>
</books>
<?php
$doc = new DomDocument;
// We need to validate our document before refering to the id
$doc->validateOnParse = true;
$doc->Load('book.xml');
echo "The element whose id is 'php-basics' is: " . $doc->getElementById('php-basics')->tagName . "
";
?>
The above example will output:
The element whose id is 'php-basics' is: book
SEE ALSO
DOMDocument::getElementsByTagName.
PHP Documentation Group DOMDOCUMENT.GETELEMENTBYID(3)