Jump to content
buckibooster

Trouble displaying XML file

Recommended Posts

Let me preface this thread by saying I know very little about xml but a good deal about php. My overall goal is to take data entered by my users to create a word report which is sent back to them through their browser. Up to this point, I have:

  • created a report document in MS Word (2010);
  • saved it as an xml file;
  • opened the xml file using notepad to view the underlying xml code;
  • figured out how to edit the code the way I want to using php;
  • copied the original xml code into a php file with additional php code to modify the file; and
  • tried to publish the edited xml file from within my php file to my web browser (IE 10).

My problem is that my browser displays the file code correctly within the browser instead of the word document as it should appear after editing. How do I get the code to publish in my browser as a word document? Thanks in advance for your timely assistance.

Share this post


Link to post
Share on other sites

So in instead of this

<ns:code>words</ns:code>
You want this:
Words
You'll have to process it on either the server or client side and extract the characters. Or you learn exstenbile stylesheet language transformation, to transform your xml into HTML or XHTML.

Share this post


Link to post
Share on other sites

Thanks ADHD but the file is being generated on the server side using php. The form on my site submits to a server side database using a php file. This php file uses the submitted data to create a xml file on the server file by editing the code from my xml Word file. This dynamically created xml file is then displayed through the php file. Unfortunately, the xml file displays as code and not the word document it is generated from.

Share this post


Link to post
Share on other sites

Could.... I don't know...All I can say is do what I would do. Start small. Start with one word and do the process again, make it simple, than after one success, add on to it until you have accomplish your goal.

Edited by L8V2L

Share this post


Link to post
Share on other sites

Cryptic and of little help. Thanks for the effort.

Post this in php. This is more of a php issues than a xml issues to me.

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...