473,657 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML formatting in Mozilla Firefox

I am creating an xml document using XMLOutputter in JAVA, then
displaying the xml file in Firefox browser.

My problem is that I want to simply display the XML as idented text,
but the browser adds "-" signs to the text.
So when I try to copy+paste the text I also get the "-" signs with it.

Can I cause the browser to display an idented XML text without the "-"
signs??

An example of copy paste:
*************** *************** *

-
<XML>
-
<defaultConfi g>
-
<Server checkInterval=" 300"/>
</Server>
</defaultConfig>
</XML>

Thanks in advance

Jun 14 '06 #1
5 5982


mi****@gmail.co m wrote:
I am creating an xml document using XMLOutputter in JAVA, then
displaying the xml file in Firefox browser.

My problem is that I want to simply display the XML as idented text,
but the browser adds "-" signs to the text.
So when I try to copy+paste the text I also get the "-" signs with it.

Can I cause the browser to display an idented XML text without the "-"
signs??


If the XML is not associated with a stylesheet (e.g. CSS stylesheet or
XSLT stylesheet) and if there are no elements in namespaces Mozilla
supports (e.g. XHTML namespace, MathML namespace, SVG namespace) then
Mozilla applies a default XSLT stylesheet to render the tree of the
document in a pretty printed form.
If you don't want that then define your own stylesheet and associate it
with e.g.
<?xml-stylesheet type="text/css" href="file.css" ?>
with the XML document.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 14 '06 #2
Do you happen to have such stylesheet that will display the XML tree
without the "-" signs? (or know where I can get one...)

Martin Honnen wrote:
mi****@gmail.co m wrote:
I am creating an xml document using XMLOutputter in JAVA, then
displaying the xml file in Firefox browser.

My problem is that I want to simply display the XML as idented text,
but the browser adds "-" signs to the text.
So when I try to copy+paste the text I also get the "-" signs with it.

Can I cause the browser to display an idented XML text without the "-"
signs??


If the XML is not associated with a stylesheet (e.g. CSS stylesheet or
XSLT stylesheet) and if there are no elements in namespaces Mozilla
supports (e.g. XHTML namespace, MathML namespace, SVG namespace) then
Mozilla applies a default XSLT stylesheet to render the tree of the
document in a pretty printed form.
If you don't want that then define your own stylesheet and associate it
with e.g.
<?xml-stylesheet type="text/css" href="file.css" ?>
with the XML document.
--

Martin Honnen
http://JavaScript.FAQTs.com/


Jun 14 '06 #3


mi*****@gmail.c om wrote:
Do you happen to have such stylesheet that will display the XML tree
without the "-" signs? (or know where I can get one...)


Those signs are there as script allows to collapse and extend subtrees
dynamically. If you want to see the XML source then use view source.
As for a stylesheet, I can't point you to one.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 14 '06 #4
mi*****@gmail.c om wrote:
Do you happen to have such stylesheet that will display the XML tree
without the "-" signs? (or know where I can get one...)


The standard identity stylesheet, with xsl:output set to do indenting,
ought to do the job.
My problem is that I want to simply display the XML as idented text,
but the browser adds "-" signs to the text.


Note that the -'s are actually a browser feature -- they're active
controls that can be used to minimize/maximize subtrees of the document.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jun 14 '06 #5

Joe Kesselman wrote:
mi*****@gmail.c om wrote:
Do you happen to have such stylesheet that will display the XML tree
without the "-" signs? (or know where I can get one...)


The standard identity stylesheet, with xsl:output set to do indenting,
ought to do the job.
My problem is that I want to simply display the XML as idented text,
but the browser adds "-" signs to the text.


Note that the -'s are actually a browser feature -- they're active
controls that can be used to minimize/maximize subtrees of the document.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry


I know these "-" signs are for collapsing, but I wish to display the
XML as idented text, without those signs.
I can't use view-source and then copy-paste since the identation is
ruined

Jun 14 '06 #6

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

Similar topics

5
4010
by: news | last post by:
I've a site: http://gto.ie-studios.net/products.php that looks perfectly fine in Windows whether with IE or Firefox 1.0. But when viewed in the Linux version of Firefox 1.0, images get misaligned and breaks between then appear. Why the two different behaviors on the same browser but different OS's? Anyway, that page as an example DOES W3C HTML validate AND W3C CSS validate as well. So, there's no ERRORS per se, but I suppose there's...
5
10266
by: Jarson | last post by:
My JavaScript is trying to POST data to a CGI script (Perl) using XMLHttpRequest. My CGI server gets different data from IE than Mozilla Firefox. // For Mozilla, req = new XMLHttpRequest(); // For IE req = new ActiveXObject("Microsoft.XMLHTTP"); req.onreadystatechange = requestHandler ; // function to handle async response req.open('POST', myURL, true); // use POST req.send('foo=11&bar=22') ;
0
1579
by: autogoor | last post by:
I want to put a java Applet in a jsp page. Here is what I used: <jsp:plugin type="applet" code="mypackage.myApplet" width="450" height="350" > <jsp:params>...</jsp:params>
5
2524
by: thatseattleguy | last post by:
I'm stumped. Visit: http://positivesweat.com/class.html ....and look at the tables in the middle labeled "morning" and "evening". Do this in both IE and Firefox. The tables appear to me to be defined identically (to take up 100% of the width of the parent table), and indeed IE makes them the same width, as I wanted and expected. But in Firefox (latest), the "evening"
7
4670
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is quite ugly. The black area is larger then it is once an item is added. How can I solve this problem either by: A) Having only the header black and the rest of the empty block white or gray (preffered solution) B) Having the color gray or white...
10
2361
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;
9
3135
by: Alex D. | last post by:
Hi, I have a frame in one of my pages that I use to show diferent pages each time. I am experiencing an weird behaviour in Mozilla and Firefox, when the frame's source is specified in the server side it works OK, but when the content of the frame is changed in the client browser clicking over a link then the frame dont render the pinctures but just the text. I dont understand. Any ideas?? Thanks.
8
7762
by: Clément | last post by:
Hi! I am currently developping a user interface with Ajax/C#/.net. And I am facing a problem with Mozilla, and Firefox. I use the function innerHTML to load a Web UserControl into a div, this way the main page never gets refreshed. It works perfectly under IE, but with Mozilla and Firefox I got a problem : there is a space before the thing I want to display everytime I use ".innerHTML".
1
569
by: michal2 | last post by:
I am creating an xml document using XMLOutputter in JAVA, then displaying the xml file in Firefox browser. My problem is that I want to simply display the XML as idented text, but the browser adds "-" signs to the text. So when I try to copy+paste the text I also get the "-" signs with it. Can I cause the browser to display an idented XML text without the "-" signs??
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8726
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...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
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
7320
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...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
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.