473,503 Members | 3,722 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>
-
<defaultConfig>
-
<Server checkInterval="300"/>
</Server>
</defaultConfig>
</XML>

Thanks in advance

Jun 14 '06 #1
5 5964


mi****@gmail.com 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.com 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.com 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.com 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.com 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
3996
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...
5
10247
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(); //...
0
1568
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
2513
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...
7
4665
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...
10
2336
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...
9
3130
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...
8
7748
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...
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...
0
7192
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
7064
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
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7315
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...
1
6974
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...
1
4991
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
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
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...

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.