8 More Discussions You Might Find Interesting
1. Open Source
What is your favorite Linux distro?
and possibly why?
Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)
Discussion started by: milhan
192 Replies
2. What is on Your Mind?
We have asked UNIX.com users over the years what is their favorite editor and why. Here is the top three answers.
Here is a new YT video on this question:
What Editor Does Everyone Use?
https://youtu.be/gqE8RTZZt9g
Of course, vi was the overwhelming favorite.
Credits:
1080 HD... (3 Replies)
Discussion started by: Neo
3 Replies
3. What is on Your Mind?
Video: What is Your Favorite Linux Distro? UNIX.com and Primis
https://youtu.be/doa9sA6q9Uw
With so many great flavors of Linux to choose from, we asked our UNIX.com members what is their favorite Linux distro and why.
Here are the results:
What is your favorite Linux distro?
... (0 Replies)
Discussion started by: Neo
0 Replies
4. Linux
I'm looking for a new file/directory synchronizer.
I've been using unison because it works on both windows and linux.
However, it often chokes on the very long directory paths and file names I encounter when backing up eclipse and eclipse workspace directories. I suppose one could argue that I... (2 Replies)
Discussion started by: siegfried
2 Replies
5. What is on Your Mind?
I am curious about the most popular ssh client on Windows environment. Talking about me, I use PuTTY most of the time coupled with WinSCP to transfer files. But, I like Tera Term too. It has great drag-drop feature where you can drag a file/folder and drop on the window and it will transfer the... (14 Replies)
Discussion started by: admin_xor
14 Replies
6. UNIX for Dummies Questions & Answers
I looking to broaden my knowledge in Unix/Linux. I have taken some basic classes in the past and tinkered a little with operating system at home..
What i am looking for is if someone could suggest a good book or class or both to help out. Looking at getting a Unix or Linux Certification. I work... (7 Replies)
Discussion started by: harlemi
7 Replies
7. What is on Your Mind?
Hello,
I am planning to revise the RSS News subforum areas, here:
News, Links, Events and Announcements - The UNIX Forums
... maybe with a subforum for each OS specific news, like HP-UX, Solaris, RedHat, OSX, etc. RSS subforums....
Please post your favorite OS specific RSS (RSS2) link... (0 Replies)
Discussion started by: Neo
0 Replies
8. Linux
I want to learn Linux/Unix shell scripting, I searched this forum but got some results for Unix Admin books and general Linux books.
Would someone recommend a good Linux Shell Scripting book?
I did order one book
A Practical Guide to Linux(R) Commands, Editors, and Shell Programming ... (4 Replies)
Discussion started by: thoughts
4 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)