0

I need to read an uploaded XML file, i.e. may be from $_FILES. I tried this with fopen() and fread(), but it outputs XML in string format. but I want XML to be read in exact XML format, so that I can put it in database efficiently.

Nikola
  • 14,888
  • 21
  • 101
  • 165
pooja
  • 1
  • 2
  • 1
    Hi..can you post your code..? we want to see what you have tried.. – Amit Verma Mar 05 '15 at 11:46
  • 1
    Well an XML file is a string of characters, what do you expect to see different? What's the difference between "XML in string format" and "exact XML format"? – Mark Baker Mar 05 '15 at 11:48
  • If you need to parse the XML in any way, then you need to feed the data that you've read to either SimpleXML or XMLReader for parsing – Mark Baker Mar 05 '15 at 11:49
  • Well, as far as I think you need to learn basic of how xml is parsed using php..google may help you on this. Search a tutorial in google. – Amit Verma Mar 05 '15 at 11:57
  • @pooja: I closed your question against a reference question on the topic. there are also other existing questions that then are more database specific. asking for all at once in "how to" style most often does not give you what you're looking for, search for the sub-steps. – hakre Mar 06 '15 at 22:29

0 Answers0