rejetto forum

XML Problem

0 Members and 1 Guest are viewing this topic.

Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hey all,

I just started using HFS yesterday so I'm still new to all of this. I am trying to display an xml file on my page and no matter what I try it always shows up as a download instead of displaying it as a page, and if I just choose to "Open" it obviously doesn't work because the xsl file isn't in the "Temp" folder. I've tried right clicking the file and selecting "Advanced->Don't consider as a download" and there is no change. I've tried adding *.xml to the "Advanced->Don't consider as a download (mask)..." and there's no change. I've also tried "Other Options->Open directly in browser" and adding *.xml to that too. Is there something stupid or simple I don't know/understand that is preventing me from simply viewing the xml file? (I've tried viewing it locally and it works fine so it's not my style sheet or the file it's self)



Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
You should just have to open the file in a new tab or window, target="blank". Just duplicate [file] and call it [file.xml]

[file.xml]
<a blah target="_blank">xml file</a>

Then xml file should open in a new tab or window showing it as a page, firefox, ie and opera should show it.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
what you mean by "it works locally" ?
accessing HFS with localhost? or doubleclicking on the file on your disk?


Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
You should just have to open the file in a new tab or window, target="blank". Just duplicate [file] and call it [file.xml]

[file.xml]
<a blah target="_blank">xml file</a>

Then xml file should open in a new tab or window showing it as a page, firefox, ie and opera should show it.

If you mean linking to it from an html file, when I click the link it opens and new tab and just tells me down download it. I tried it using <a href="file.xml" target="file.xml">xml file</a>.
« Last Edit: February 26, 2008, 11:03:28 PM by kevroy314 »


Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
what you mean by "it works locally" ?
accessing HFS with localhost? or doubleclicking on the file on your disk?

When I said locally I meant doubleclicking. It works with a doubleclick but when I load it through the site or localhost it just forces me to download it.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
if it can be done, it depends on the browser.
when you wrote xsl, did you mean xsl or was a typo for xml?


Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
if it can be done, it depends on the browser.
when you wrote xsl, did you mean xsl or was a typo for xml?

well i've got a program that outputs data to an xml file and then I have a xsl (xml stylesheet) written for it so when i open the xml file on my computer it shows up nicely formatted. I'm using the latest version of firefox.


Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
I just tried it in the latest IE and it worked, any idea how to change settings in firefox so i can view it? (i've tried other xml files from other sites and they worked)


Offline kevroy314

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
so i changed the encoding to ISO-8859-1 and it started working in firefox. problem solved!