Jump to content

outputting xml from php using html namespace


TomCat

Recommended Posts

Hi,

I'm hoping someone can help me out.
(example using php 5.1.4 and firefox 1.5.0.7)

I am creating an xml document on the fly and trying to output it in a browser using xsltprocessor

The output is:
<?xml version="1.0"?>
<h:html xmlns:h="http://www.w3.org/1999/xhtml">
<h:head>
<h:title>TESTING</h:title>
</h:head>

<h:body>
<h:table width="100%" border="2">
<h:tr bgcolor="silver" id="table_head">
<h:th>Name</h:th><h:th>Description</h:th>
</h:tr>
<h:tr id="table_body">
<h:td>DOG</h:td>
<h:td>Loxley type of user</h:td>
</h:tr>
<h:tr id="table_body">
<h:td>admin</h:td>
<h:td>System administrator</h:td>
</h:tr>
</h:table>
</h:body>
</h:html>

which is just what I wanted

The problem is when it is echoed to the browser I just get a string of text.

If i copy the source into either a .xml or .xhtml file it works but only in firefox not in i.e.

Can anyone please help me - am i missing something?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.