473,386 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can I echo the values of an DOM object?

Hello I have the following code that gets some data from a RSS. I would like to print the values of $img and $txt but I do not know how. I tried to echo the values and I had a Catchable fatal error: Object of class DOMNodeList could not be converted to string
I read some tutorials and they say about a new foreach. So i did this with no result either. What should I do? Thank you
Mar 25 '11 #1
1 4026
Dormilich
8,658 Expert Mod 8TB
that’s correct, you cannot print a list directly. you would have to loop through the list and operate on the individual elements (mind that only Nodes inheriting from DOMCharacterData (Text, Comment, CDATA) have a nodeValue (that is not null)). you might want to look into textContent.
Mar 26 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Paul | last post by:
Hi all. I have a class with inherits the HybridDictionary object and when i am binding this to a datagrid for example using the "Values" object I want to have some way of sorting the results....
2
by: | last post by:
Hi there, I use a Custom OPC interface. Aftre reading multiple data I get an object which includes an array. But in design time this is only declared as object (OPC definition, can not change...
12
bartonc
by: bartonc | last post by:
For those of you who have never used the *listofargs and **dictofargs syntax, here is a look at the latter. By using **kwargs, a dictionary of any size is sent into the fuction as dict(a=1, b=2)....
0
by: sklett | last post by:
I've got a new DGV problem that makes no sense. I need to implement a very simple "row move" operation in a DGV. basically if the user pressed Shift+Up or Shift+Down the selected row and it's...
2
by: assgar | last post by:
I am having problems getting the user selected form info to inserted into the mysql database. I am also rec eving an error: Warning: Variable passed to each() is not an array or object in ...
4
by: sufian | last post by:
Below is the field where user enters his/her email address and the AJAX post request is sent to the server and the user sees the message: echo("<div id=\"message\" class=\"success\">Thank you! You...
32
by: Request-1 | last post by:
hi folks, html coder here, new and terrified * of php!! aaaaaa! i'm trying to bury a JS script to rotate a photo, in a page i converted from html to php. the conversion went well, it was to...
2
by: bips2008 | last post by:
The code seems to work fine in other browser but in IE it throws this error. This is very urgent for me and any help would be greatly appreciated For your convienence i have posted the code for the...
0
by: JonTwend | last post by:
I am working with the Twitter API and finding it great fun and generally easy to use. But I am having trouble getting to the data in the trends/current.json file. I am able to loop through the...
0
by: Sumprit Purabi | last post by:
Hi, everyone. I am using java swing. Till now I could able to display database values in a JTable by executing a query. Now, what i needed is that i have to place two buttons(PREVIOUS,NEXT) one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.