473,805 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox1.5: DOMParser.parse FromString() 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.parseFro mString( 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 9975


sf****@gmail.co m wrote:

var parser = new DOMParser();
var xmlDoc = parser.parseFro mString( 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.parseFro mString( 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.parseFro mString( 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
3097
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 across "null" string. I know that I will get an "undefined" when I try to retrieve something from the DOM which doesn't exist. I have used null myself to initialize or reset variables. But in which
8
2375
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 ("categories2subcategories", dc1, dc2); ds.Relations.Add (dr1); dc1 always works fine. dc2 always returns null. There ARE records in
14
3170
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 it makes difference to explicitly put them to null after working with them is done - it somehow makes the GC collect them sooner, like here: void SomeFunc() { MyClass c = new MyClass();
4
2763
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 "main" object I want to initialize the property "Info" to null in a way that will make the c# programmer (the user) able to write: if (MyObj.Info==null) {..}
8
4436
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? Thanks in advance for any helpful suggestions
2
2898
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
4054
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 function can return the right object. Could anyone help me out? Thanks,
1
6090
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 narrowed that part down; just trying to create the object now) If I check for the value of xmlhttpobj, it is always null or undefined.
3
2374
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}" style="width:165px; margin-left: 25px;" forceId="true" tabindex="112"> by using document.getElementById("starttimeScheduler") in my javascript function. but this is always returning null. The <t:inputText > is present with in a <t:div>. Can you please...
0
9718
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10614
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.