| | |
data to be displayed in xml
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 95
Reputation:
Solved Threads: 4
PHP Syntax (Toggle Plain Text)
// create the XML data $xmlData = CreateSomeXMLFromSQL(); // tell the browser its XML header("content-type: text/xml"); echo $xmlData;
Last edited by jakesee; Apr 20th, 2009 at 7:12 am.
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
PHP Syntax (Toggle Plain Text)
// create the XML data $xmlData = CreateSomeXMLFromSQL(); // tell the browser its XML header("content-type: text/xml"); echo $xmlData;
•
•
Join Date: Jul 2008
Posts: 95
Reputation:
Solved Threads: 4
XML is a method of writing a document, not a template document that you just insert values and then dislay.
in this regard, you need to write your own XML.
MySQL is the database and SQL is the language for querying (instructing, commanding) the database to do something. Depending on which one you are talking about, these are for data storage and retrieval. They have nothing to do with XML.
To create your own XML means you need to take the data and format it in the XML way.
Displaying it as XML in the web browser means sending the php header() before printing the text.
I think you need to read more about what is XML first http://www.w3schools.com/xml/default.asp
Then write your own XML, storing it in a php variable such as $xmlData and then finally output it using the code provided previously.
in this regard, you need to write your own XML.
MySQL is the database and SQL is the language for querying (instructing, commanding) the database to do something. Depending on which one you are talking about, these are for data storage and retrieval. They have nothing to do with XML.
To create your own XML means you need to take the data and format it in the XML way.
Displaying it as XML in the web browser means sending the php header() before printing the text.
I think you need to read more about what is XML first http://www.w3schools.com/xml/default.asp
Then write your own XML, storing it in a php variable such as $xmlData and then finally output it using the code provided previously.
Last edited by jakesee; Apr 20th, 2009 at 3:25 pm.
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
thanks a lot for your help and quick reply ....
•
•
•
•
XML is a method of writing a document, not a template document that you just insert values and then dislay.
in this regard, you need to write your own XML.
MySQL is the database and SQL is the language for querying (instructing, commanding) the database to do something. Depending on which one you are talking about, these are for data storage and retrieval. They have nothing to do with XML.
To create your own XML means you need to take the data and format it in the XML way.
Displaying it as XML in the web browser means sending the php header() before printing the text.
I think you need to read more about what is XML first http://www.w3schools.com/xml/default.asp
Then write your own XML, storing it in a php variable such as $xmlData and then finally output it using the code provided previously.
![]() |
Similar Threads
- XML Bug Error. (XML, XSLT and XPATH)
- Pls help me in working with XML in asp.net (ASP.NET)
- JSP database connectivity according to Model View Controller (MVC) Model 2 (JSP)
- CF8 XML output problem with special character (ColdFusion)
- struts tutorials (Java)
- Displaying an XML table (C#)
- Who can use this webservice ? (RSS, Web Services and SOAP)
- What exactly is xml? (RSS, Web Services and SOAP)
- How to re-organized XML file and call XML file from my software (RSS, Web Services and SOAP)
- selecting certain xml elements (RSS, Web Services and SOAP)
Other Threads in the PHP Forum
- Previous Thread: array search
- Next Thread: I need help with an avatar system
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





