Skip to content

Instantly share code, notes, and snippets.

@jwinett
Created June 22, 2018 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwinett/857d7b59c77a7f9f355f6d3e13146107 to your computer and use it in GitHub Desktop.
Save jwinett/857d7b59c77a7f9f355f6d3e13146107 to your computer and use it in GitHub Desktop.
DOMDocument parsing Karen's first Power Tools Newsletter
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'September 28, 1999' (length=18)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'September 28, 1999' (length=18)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'By Karen Kenworthy' (length=18)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'By Karen Kenworthy' (length=18)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'IN THIS ISSUE' (length=13)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'IN THIS ISSUE' (length=13)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'ul' (length=2)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'ul' (length=2)
public 'nodeValue' => string '
A fond farewell to WINDOWS Magazine, and a new beginning
This month's new "Power Tool", Karen's Windows Watcher
' (length=116)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'ul' (length=2)
public 'baseURI' => null
public 'textContent' => string '
A fond farewell to WINDOWS Magazine, and a new beginning
This month's new "Power Tool", Karen's Windows Watcher
' (length=116)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'a' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'a' (length=1)
public 'nodeValue' => string 'Goodbye, and Hello!' (length=19)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'a' (length=1)
public 'baseURI' => null
public 'textContent' => string 'Goodbye, and Hello!' (length=19)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'Welcome to the new Power Tools newsletter! Many of you have written to say how
disappointed you are the print edition of Windows Magazine is no more. You can add me
to the list of mourners. WINDOWS Magazine was a special place to work, and I'll
always treasure the time I spent there. ' (length=289)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'Welcome to the new Power Tools newsletter! Many of you have written to say how
disappointed you are the print edition of Windows Magazine is no more. You can add me
to the list of mourners. WINDOWS Magazine was a special place to work, and I'll
always treasure the time I spent there. ' (length=289)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'But even this cloud has a silver lining. WINDOWS Magazine may be gone, but its web
site, Winmag.com, lives on [sigh -- at least it did for a couple of years]. And I'll continue writing and talking about my Power Tools,
both on the web and here in my newsletter.' (length=263)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'But even this cloud has a silver lining. WINDOWS Magazine may be gone, but its web
site, Winmag.com, lives on [sigh -- at least it did for a couple of years]. And I'll continue writing and talking about my Power Tools,
both on the web and here in my newsletter.' (length=263)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'a' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'a' (length=1)
public 'nodeValue' => string 'Window Watcher' (length=14)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'a' (length=1)
public 'baseURI' => null
public 'textContent' => string 'Window Watcher' (length=14)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'I'll have more to say about this newsletter, and my web site, soon. But now, let's get
down to business! Let's get to know my latest Power Tool, Karen's Window
Watcher.' (length=170)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'I'll have more to say about this newsletter, and my web site, soon. But now, let's get
down to business! Let's get to know my latest Power Tool, Karen's Window
Watcher.' (length=170)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'Even before I wrote this program, I knew my computer had a secret life. In addition to
the work I assign it, my little friend constantly runs programs and performs tasks I know nothing about. Sure, I've been told this is perfectly normal, even necessary. A computer must do a lot of work behind the scenes, to put on the big show I see every day. None of this need concern me.' (length=377)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'Even before I wrote this program, I knew my computer had a secret life. In addition to
the work I assign it, my little friend constantly runs programs and performs tasks I know nothing about. Sure, I've been told this is perfectly normal, even necessary. A computer must do a lot of work behind the scenes, to put on the big show I see every day. None of this need concern me.' (length=377)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'But I'm nosey. I wrote Karen's Window Watcher to find our what my computer was
up to. When it runs, it displays a small window (you can see an example at my web site at https://www.karenware.com/powertools/ptwinwatch.html).
The window lists the title bar text of
every window of every program my computer is currently running. ' (length=330)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'But I'm nosey. I wrote Karen's Window Watcher to find our what my computer was
up to. When it runs, it displays a small window (you can see an example at my web site at https://www.karenware.com/powertools/ptwinwatch.html).
The window lists the title bar text of
every window of every program my computer is currently running. ' (length=330)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'So what, you say? You can see all the windows on your screen? Guess again. Many
programs create hidden windows. Some of those windows may eventually be displayed,
but some never see the light of day. And a few programs never display any windows on
your screen. Without the Window Watcher, you might never know these invisible
windows, and the programs that create them, exist. How many hidden windows are
lurking under your computer's desktop? As I writ this I can see eight windows on my
computer's scree'... (length=597)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'So what, you say? You can see all the windows on your screen? Guess again. Many
programs create hidden windows. Some of those windows may eventually be displayed,
but some never see the light of day. And a few programs never display any windows on
your screen. Without the Window Watcher, you might never know these invisible
windows, and the programs that create them, exist. How many hidden windows are
lurking under your computer's desktop? As I writ this I can see eight windows on my
computer's scree'... (length=597)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'Every Windows program must have at least one window, called its top-level window. In
addition, it may also create other windows, called child windows. Some child windows
are elaborate, even having children of their own. Other child windows are very simple,
consisting of a single button, checkbox, or other Windows control.' (length=326)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'Every Windows program must have at least one window, called its top-level window. In
addition, it may also create other windows, called child windows. Some child windows
are elaborate, even having children of their own. Other child windows are very simple,
consisting of a single button, checkbox, or other Windows control.' (length=326)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'The Window Watcher lets you decide which types of windows you'll see. Place a
checkmark in its "Display child windows" checkbox, and you'll see all windows, both
top-level and children. Child windows are listed immediately below their parent,
indented a few characters. Clear the checkbox, and only top-level windows are displayed.
Another checkbox turns Windows Watcher's "Auto Update" feature on and off. When this feature is on, the list of windows is automatically refreshed every two seconds. When off, '... (length=589)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'The Window Watcher lets you decide which types of windows you'll see. Place a
checkmark in its "Display child windows" checkbox, and you'll see all windows, both
top-level and children. Child windows are listed immediately below their parent,
indented a few characters. Clear the checkbox, and only top-level windows are displayed.
Another checkbox turns Windows Watcher's "Auto Update" feature on and off. When this feature is on, the list of windows is automatically refreshed every two seconds. When off, '... (length=589)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'p' (length=1)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'p' (length=1)
public 'nodeValue' => string 'If you'd like to see what your computer is up to, download your copy of the Window
Watcher at https://www.karenware.com/powertools/ptwinwatch.asp. As always, it's free. You'll
also find the program's Visual Basic 6.0 source code, if you want to see how it works, or
add features of your own. Whatever you do, all I ask is don't keep it a secret. :)' (length=352)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'p' (length=1)
public 'baseURI' => null
public 'textContent' => string 'If you'd like to see what your computer is up to, download your copy of the Window
Watcher at https://www.karenware.com/powertools/ptwinwatch.asp. As always, it's free. You'll
also find the program's Visual Basic 6.0 source code, if you want to see how it works, or
add features of your own. Whatever you do, all I ask is don't keep it a secret. :)' (length=352)
/media/sf_Zend-Karenware/karenware.git/public/joe/parser/parse.php:52:
object(DOMElement)[7]
public 'tagName' => string 'img' (length=3)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'img' (length=3)
public 'nodeValue' => string '' (length=0)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => null
public 'lastChild' => null
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => string '(object value omitted)' (length=22)
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'img' (length=3)
public 'baseURI' => null
public 'textContent' => string '' (length=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment