Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
JavaScript and XML

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> XML
View previous topic :: View next topic  
Author Message
bitphr3ak
New one
New one


Joined: 20 Nov 2006
Posts: 2

PostPosted: Mon Nov 20, 2006 5:42 pm    Post subject: JavaScript and XML Reply with quote

I'm working to move an IE only JavaScript / XML based web component to one that works in Firefox. The problem is, in JavaScript the previous programmer used the .xml property of the ActiveXObject("Microsoft.XMLDOM") [an IE solution]. This property returns the complete XML document from the root node down the tree as a string.

The steps are as follows:

1) JavaScript loads the XML document using ActiveXObject("Microsoft.XMLDOM")

2) The .xml property is used to pass the xml, as a string, to a Flash movie.

3) Things function as expected.

My question,

Is there a straightforward way to load an XML document, and capture the complete XML in a string, within Firefox?

I'm sure I can hammer out a solution, but hints, suggestions, examples would really help.

Cheers!
Back to top
View user's profile Send private message
bitphr3ak
New one
New one


Joined: 20 Nov 2006
Posts: 2

PostPosted: Mon Nov 20, 2006 8:32 pm    Post subject: Found my answer Reply with quote

Basically...

1) Get the root node of the XML Object
2) call the serializeXML function, pass the root node and children.
3) it returns the XML as a string.

This does for Firefox what .xml does for IE>

var oRoot = objXML.documentElement;
txtXML = serializeXML(oRoot);

function serializeXML(pNode){
var objSerializer = new XMLSerializer();
return objSerializer.serializeToString(pNode);
}


Cheers again
Back to top
View user's profile Send private message
vikas1234
Frequent Poster
Frequent Poster


Joined: 24 Aug 2008
Posts: 29

PostPosted: Sat Jun 27, 2009 4:52 am    Post subject: Reply with quote

Thanks .. is it like SAX parser in which you fetch the node on the requirement basis
_________________
Free Online Books|Free pdf Books |free AJAX Books
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> XML All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert