dirtside
dirtside

Reputation: 8270

Better XML viewing in Firefox

When you view a simple XML document in Firefox, it goes to the standard XML display mode, where you can collapse subtrees, etc. But it's pretty limited in functionality; there's nothing convenient like "expand all" and "collapse all" buttons, there's that annoying "This XML file does not appear to have any style information associated with it. The document tree is shown below" message at the top of the page. Are there any decent Firefox extensions that provide better XML viewing/manipulating/navigating? I looked in the Mozilla extension repository but there didn't seem to be anything promising.

Upvotes: 28

Views: 34499

Answers (10)

dalton
dalton

Reputation: 1

The problem appears to be with Firefox version above v48. I regularly access RSS Feeds, so proper xml page display is important to me. The only way I have found to get around the problem is to have two different versions of Firefox on my system and run the older version when I want to access RSS (xml) pages.

Upvotes: 0

Javasick
Javasick

Reputation: 2993

As for me Pretty XML is the best extension to view XML in Firefox https://addons.mozilla.org/ru/firefox/addon/pretty-xml/

Upvotes: 1

user
user

Reputation: 25738

This is more a hack than a solution, but you can open Firefox Developer Tools and browse an XML there.

Actually currently it's not much better than the normal view, but at least it has all nodes collapsed from start and you can Alt+click to expand all descendants of a node (since Firefox 31).

Upvotes: 1

Andrew B
Andrew B

Reputation: 1668

This extension is pretty good:

https://addons.mozilla.org/en-US/firefox/addon/xmlutils/

Adds a nicer font and includes xPath evaluation.

Upvotes: 0

Deepak.Aggrawal
Deepak.Aggrawal

Reputation: 1277

You can add developer toolbar that allows XML Developer's use of standard tools all from your browser!

https://addons.mozilla.org/en-us/firefox/addon/xml-developer-toolbar/

Upvotes: 1

Pierre
Pierre

Reputation: 35256

You can associate an XSLT Stylesheet to your XML document by adding :

<?xml-stylesheet type="text/xsl" encoding="UTF-8" href="yourstylesheet.xsl" version="1.0"?>

after the XML declaration. See http://www.w3schools.com/xsl/xsl_transformation.asp for more information.

Upvotes: 3

wmitchell
wmitchell

Reputation: 5745

You can edit firefox's own xsl doc as indicated by the following link

I'm after the same kind of thing myself i'll have a play with xsl and post my results.

Upvotes: 4

SpliFF
SpliFF

Reputation: 38976

Associate another viewer with the XML mimetypes you want to edit by editing mimeTypes.rdf in your profile directory. XML is application/xml and text/xml but there are also specific variants like application/xhtml+xml, application/svg+xml and application/rss+xml that'll you'll need to decide whether to override the default behaviour (catching these would break XHTML rendering, SVG images and RSS feeds respectively).

Once you've registered the type you should be able to modify the default action under Tools->Options / Applications to use whatever editor you want.

Upvotes: 2

Cameron
Cameron

Reputation: 1918

Nat, this doesn't help if you're downloading someone else's XML content.

I usually use IE 6 (at least you can open it in a text editor), but IE8 acts similarly to Firefox. I'd love an answer to this question.

Upvotes: 0

Nat
Nat

Reputation: 9951

When I write web services that serve XML content, I usually prepend an XML stylesheet declaration to the content to style the content for human consumption. The stylesheet is a client-side XSLT transform that runs in the browser to turn the XML into XHTML and CSS, maybe with some JavaScript to add interactivity. It makes it much easier to debug the webservice and often means I don't have to write an HTML webapp to access the same data.

Upvotes: 3

Related Questions