0

How can I parse an xml string <description>content</description> and move the content into my database with PHP7?

Example:

Database Structure:

ID;
NAME;
DESCRIPTION;

XML:

<thing>
<id>1</id>
<name>aaa</name>
<description>something</description>
ecc...
</thing>

So, let's pretend we modified every column for mistake but we have saved everything in a XML file, but the SQL is very big to modify manually, so we could do what I explained before. How could I accomplish this? Thanks in advance, and sorry if this question is very strange.

3
  • Possible duplicate of Parsing XML data using php to put into mysql database Commented Aug 7, 2017 at 20:06
  • What have you tried? Do you use a CSV file as database? Please provide more infos about the XML structure or post a better example. Commented Aug 7, 2017 at 20:45
  • I did just an example at the moment to show you more details. I didn't know how to explain, because is a long process. Commented Aug 7, 2017 at 23:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.