搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Why does firefox not render XML content like other browsers?

more options

I'm learning AJAX and PHP and run into problems with some exercises. The .php file renders fine in Chrome and Edge (in collapsable tree view), but not in Firefox. See attachments. What could be causing this (mis)behavior?

I'm learning AJAX and PHP and run into problems with some exercises. The .php file renders fine in Chrome and Edge (in collapsable tree view), but not in Firefox. See attachments. What could be causing this (mis)behavior?
附加的畫面擷圖

由 jondalar 於 修改

被選擇的解決方法

It looks like either Firefox is not finding your XSL style sheet or is not applying it.

Can you provide a link to your PHP page so someone could take a look?

從原來的回覆中察看解決方案 👍 1

所有回覆 (6)

more options

選擇的解決方法

It looks like either Firefox is not finding your XSL style sheet or is not applying it.

Can you provide a link to your PHP page so someone could take a look?

more options

You can check the Web Console (Firefox menu button or Tools > Web Developer) for error messages.

more options

I haven't specified a style sheet. So I assume the other browsers apply some default of theirs and Firefox doesn't.

more options

There were no errors in the console. Always good to look first.

more options

See also:

  • view-source:chrome://global/content/xml/XMLPrettyPrint.xml
  • view-source:chrome://global/content/xml/XMLPrettyPrint.xsl
more options

If there's no style sheet, you usually see something like this:

https://duckduckgo.com/opensearch.xml

Screen shot attached for reference. Yours doesn't lay that page out as expected?