473,946 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.XMLDO M");

Any way to make it work in cross browsers?

please advise. thanks!!

Jul 23 '05 #1
2 1225
jr********@hotm ail.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.XMLDO M");

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.XMLHT TP"); }

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

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

HTH's

Andy

Jul 23 '05 #2


jr********@hotm ail.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.XMLDO M");

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
2572
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 does swap the first two
0
1788
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
7330
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 same problem. Internet Explorer 6 and Opera 7 have no problems with it. <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> <script>document.write (window.history.length);</script>
2
3151
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
1712
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 pyPdf. But it is in its early stage and currently only supports two functions: merge & split. I suppose working with PDF document is a common task. Just wanted to know if there are other alternatives. Thank you very much! - wcc
10
2395
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 = navigator.appName;
3
1591
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, smaller/scaled down FLV file. I'm trying to create a small, preview of the original FLV file. Is there a .NET library that will allow me to do this? Thanks!
0
9026
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 Recordset? Does the Recordset support Bookmarks? Can we use the Find and/or Seek Methods with this Recordset? Does the Recordset support the use of Indexes? Will the Absoluteposition property be able to be used on this Recordset? etc....
0
11152
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...
0
10685
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
9885
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
7416
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6111
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
6329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4938
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3538
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.