473,396 Members | 1,683 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,396 software developers and data experts.

manipulate xml that supports both IE and Mozilla

I want to use javascript to manipulate XML files.

The following code works in IE but it won't work in Mozilla.
var xml = new ActiveXObject("Microsoft.XMLDOM");

Any way to make it work in cross browsers?

please advise. thanks!!

Jul 23 '05 #1
2 1199
jr********@hotmail.com wrote:
I want to use javascript to manipulate XML files.

The following code works in IE but it won't work in Mozilla.
var xml = new ActiveXObject("Microsoft.XMLDOM");

Any way to make it work in cross browsers?

please advise. thanks!!


Hi

XMLHttpRequest is what you are after.

------------ SAMPLE CODE -------------
var xml;
try { xml = new XMLHttpRequest();}
catch (e) { xml = new ActiveXObject("Microsoft.XMLHTTP"); }

--------------------------------------

With these you can use POST and GET to retrive XML from a server.

HTH's

Andy

Jul 23 '05 #2


jr********@hotmail.com wrote:
I want to use javascript to manipulate XML files.

The following code works in IE but it won't work in Mozilla.
var xml = new ActiveXObject("Microsoft.XMLDOM");

Any way to make it work in cross browsers?


See
<http://www.faqts.com/knowledge_base/view.phtml/aid/6826/fid/616>
and if you also want to send XML back to the server then also
<http://www.faqts.com/knowledge_base/view.phtml/aid/17226/fid/616>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3

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

Similar topics

8
by: Paul | last post by:
This method: static void swap(int a, int b) { int c = a; a = b; b = c; } does not swap the values of a and b over. It doesn't work for String variables either. However the following method...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
2
by: Suresh | last post by:
Can anybody tell me that whether Mozilla supports onBlur event? I tried onBlur event with IE5 and also with Mozilla. But Mozilla is not supporting. Please give me a solution. Regards Suresh.
5
by: wcc | last post by:
Hello group, I wonder what tools/modules are avaible to manipulate PDF ducument, i.e., merge, split, rotate page, crop, etc.. I checked the PyPI page and seems the only one may fit the need is...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
3
by: noneya22 | last post by:
I am building an asp.net 2.0 application and I need to be able to convert existing FLV files on the server. Specifically, I need to be able to take an FLV file and convert it to another,...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...

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.