aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Can't get parsing XML to work in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can Watch "Can New topic
Author

Can't get parsing XML to work in JavaScript

Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
Hey, I have the following JavaScript that tries to parse some XML which was send by a Servlet:

Clientside Javascript:



Servlet:


However when my javascript comes to the point where it runs:


it fails. My internetexplorer displays error message: Object required , line 124 , char 9 (which is .childNodes)

I don't know what to do, can you help me?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why are you setting the content type twice?

If you alert/console.log posts, what does it say?

Eric
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
When I Alert, it says: [undefined]
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
Sorry it says Object element but when I say
it says it's undefined.. damnit
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187


Where is the postOverview object created? It is not in the this function.
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
whole java script:


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can't get parsing XML to work in JavaScript