473,500 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xml in html shows as plain text in mozilla

13 New Member
hi all
i have xml tags in html body. and using document.getelementbyid i am just extracting the xml. in mozilla it's working but it also prints the whole xml in plain text in browser. where in IE its only printing the extracted values.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.  
  4. <script type="text/javascript">
  5. function parseXML()
  6. {
  7.  
  8. alert(document.getElementById("xmlToolbarMeta").innerHTML)
  9.  
  10. }
  11. </script>
  12. </head>
  13. <body onload="parseXML()">
  14. <xml id="xmlToolbarMeta">
  15.  
  16.       <tasks>
  17.         <task icon="tasknew16.gif" id="new" caption="yes" hide="">
  18.           <name>New</name>
  19.           <key id="chk">n</key>
  20.           </task>
  21.        </tasks>
  22.  
  23.     </xml>
  24.  
  25. </body>
  26. </html>
  27. i want only the alert message but in mozilla it gives the alert and writes the xml in screen.
  28.  
Mar 16 '09 #1
3 3280
Dormilich
8,658 Recognized Expert Moderator Expert
this is due to XML Data Island, which is supported in IE, but not in Mozilla, thus Mozilla considers <xml> to be a unknown html element, which is rendered using the default style (I assume something like inline element).

you could try the CSS property display: none; to hide it from showing.
Mar 16 '09 #2
drhowarddrfine
7,435 Recognized Expert Expert
This is a javascript problem, not HTML or CSS or even Firefox. He should ask in the javascript forum, or probably even the .NET forum.
Mar 16 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
Using XML Data Islands in Mozilla
Mar 16 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2920
by: LRW | last post by:
Because I've had recipients of our newsletter tell us they can't (or won't) receive HTML e-mail, I found out how to make an e-mail that sends both HTML and a plaintext version in a multipart...
3
2330
by: Aaron | last post by:
Hi, I have a page done in HTML 4.01 Strict. I've noticed that on Mozilla, it doesn't load the my external stylesheet, no matter if I attach it via 'link' or '@import'. I don't want to have to...
2
2192
by: Arun | last post by:
I am trying to build a site using xmlhttprequest, so that the browser never reloads. I want to pass the HTML info of the "navigation column" , "content column" as a XML page from the server. ...
10
3451
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
2
2023
by: Kevin Blount | last post by:
I have a string of HTML (used for a specific purpose) that I'd like to use somewhere else but as plain text. Rather than introduce a specifically created plain text version I'd like to strip the...
10
12616
by: Jake Barnes | last post by:
This weekend I wanted to learn AJAX, so I set up a little toy page where I could experiment. The idea of this page is that you click in one of the boxes to get some controls, at which point you can...
21
2699
by: maya | last post by:
hi, I'm designing an HTML email for a client.. I know general guidelines (no CSS, no JavaScript... although I do use limited CSS, inside tags (as in <span style=".."we do this at work and it...
4
5053
by: cybervigilante | last post by:
I sent HTML formatted email, using PHP, to my Yahoo address from my server, and it came out fine, styles and all. I sent it to my gmail address to test it and all I see is the raw html code. But I...
2
18151
by: anu b | last post by:
Now i am sending email to my friend using session variable... but my code is as below private bool SendEmail(string email) { try
0
7136
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
7018
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
7397
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...
0
5490
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,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
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...
0
3110
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...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.