Jump to content

Trouble displaying XML file


buckibooster

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.

Link to comment
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.
Link to comment
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.

Link to comment
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
Link to comment
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.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...