473,402 Members | 2,061 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,402 software developers and data experts.

Firefox1.5: DOMParser.parseFromString() returns "[Document] null"

Hi All,

The following code returns a valid xmlDoc (since I can evaluate and
selectNodes) but its value is "xmlDoc=[Document] null" ?! Or at least
this is what the FireBug shows and (xmlDoc===null) is true.

var parser = new DOMParser();
var xmlDoc = parser.parseFromString( responseText, "text/xml");
// at this point: xmlDoc=[Document] null

I'm a bit lost on what this actually means..

Any ideas?

Regards,
Sebastian

Jul 7 '06 #1
3 9925


sf****@gmail.com wrote:

var parser = new DOMParser();
var xmlDoc = parser.parseFromString( responseText, "text/xml");
// at this point: xmlDoc=[Document] null
It might be that the output your tool shows you is first the name of the
variable, then its toString() result (which is [Document] so you have a
DOM Document there), then perhaps its nodeValue (which is null by
definition for document nodes).
But I am guessing, ask in a FireBug forum, I don't think that
alert(xmlDoc === null) will show true so that null must have some other
cause.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 7 '06 #2
Martin Honnen wrote:
var parser = new DOMParser();
var xmlDoc = parser.parseFromString( responseText, "text/xml");
// at this point: xmlDoc=[Document] null

It might be that the output your tool shows you is first the name of the
variable, then its toString() result (which is [Document] so you have a
DOM Document there), then perhaps its nodeValue (which is null by
definition for document nodes).
But I am guessing, ask in a FireBug forum, I don't think that
alert(xmlDoc === null) will show true so that null must have some other
cause.
Thanks Martin,

That was indeed the case.

Regards,
Sebastian

Jul 12 '06 #3
Martin Honnen wrote:
var parser = new DOMParser();
var xmlDoc = parser.parseFromString( responseText, "text/xml");
// at this point: xmlDoc=[Document] null

It might be that the output your tool shows you is first the name of the
variable, then its toString() result (which is [Document] so you have a
DOM Document there), then perhaps its nodeValue (which is null by
definition for document nodes).
But I am guessing, ask in a FireBug forum, I don't think that
alert(xmlDoc === null) will show true so that null must have some other
cause.
Thanks Martin,

That was indeed the case.

Regards,
Sebastian

Jul 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
8
by: Brian | last post by:
This is causing me to not be able to create a relation in my dataset. Here's my code: dc1 = ds.Tables .Columns ; dc2 = ds.Tables .Columns ; dr1 = new System.Data.DataRelation...
14
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects...
4
by: Peter Hemmingsen | last post by:
Hi, I have a dotnet object (implemented in mc++ and used in c#) which have a property called "Info". The Info property is also a dotnet object (implemented in mc++). In the constructor of the...
8
by: Just Me | last post by:
1)How can I find the folders like "My Recent Document", "Desktop", "My Pictures",... if I want to store a file there? 2) How can I find the icon for those files if I want to display it? ...
2
by: Anastasios Papadopoulos | last post by:
Hello all, I have statements like the following in my Property Get: Public Property AccountNumber() As String Get Return MyClass.AccountNumber.ToString End Get blah blah End Property
6
by: Billy | last post by:
I have a ReportViewer control (from reporting service) in one asp.net web page. The document.getElementById("ReportViewerID") always returns a null. Other controls in the pages seems OK and the...
1
by: H | last post by:
Just trying to create a basic xmlhttpobject. However, the following always returns null xmlhttpobj = New ActiveXObject("Microsoft.XMLHTTP") (it is Microsoft. and not Msxml2. I've already...
3
by: karprix | last post by:
Hi, I am working on a webapplication,( with Ajax & JSF) where I want to retrieve the value present in a <t:inputText id="starttimeScheduler" value="#{scheduledJobCreateEdit.startTimeDate}"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.