02-23-2010
It is not allowed to use these forums as a means of exchanging software, books, or any other kind of intellectual property unless you are the copyright holder, or have the explicit written approval of the same.
9 More Discussions You Might Find Interesting
1. Linux
I have just transferred from an mainframe DB2 area to an area that uses LINUX. Any suggestions for a good book to buy for learning LINUX? (1 Reply)
Discussion started by: bigdawg
1 Replies
2. Programming
can any one help me and told me about a good books to learn
1- pro c/c++ under unix
2- programming network using c under unix
thnx in advance. (1 Reply)
Discussion started by: kazanoova2
1 Replies
3. UNIX for Dummies Questions & Answers
My knowledge is weak in understanding NIS servers, setting up user accounts, mounting network file systems, clearing stale NFS handles, those sorts of things that I encounter but my IT server team handles.
Can anyone recommend a good book on the subject? Something to demystify mount points,... (1 Reply)
Discussion started by: srhadden
1 Replies
4. UNIX for Dummies Questions & Answers
which is a gud book to learn advanced korn shell scripting?
i know the basic shell scripting (1 Reply)
Discussion started by: shishirkotkar
1 Replies
5. UNIX for Dummies Questions & Answers
What is the Best book to learn UNIX from the begining?
am really a beginner and no nothing about UNIX, so what are the track that i have to trace in order to be a professional in UNIX and scripting?
What are the best books to learn it and what are the certificates such as CCNA in networks... (5 Replies)
Discussion started by: eng.pirlo
5 Replies
6. Programming
I'd like to learn C but I wanted to ask if anyone knows of a good book to start with. I came across some folks who said the best one is 'The C programming language, second edition' but some reviews said that it's not for beginners. I am learning Java and UNIX on my Mac and am familiar with... (6 Replies)
Discussion started by: Straitsfan
6 Replies
7. UNIX for Dummies Questions & Answers
I'm looking for a book to learn Linux Kernel
Now I got a basic C and operating system concept
Thanks (1 Reply)
Discussion started by: Runicer
1 Replies
8. What is on Your Mind?
Hi guys, which book are you raccomand to start learn Perl from the ground ? (1 Reply)
Discussion started by: solaris_user
1 Replies
9. Shell Programming and Scripting
I'm going to be starting a job in a month or so that I need to brush up on my Unix shell scripting skills. About 15 years ago, I took a college class for Unix shell scripting. I would like to find a good college book again, rather than just going to Amazon and just buying anything.
This is... (2 Replies)
Discussion started by: dorlow
2 Replies
LEARN ABOUT PHP
domdocument.getelementbyid
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)