0

I have set of xml files in the same structure. What I want to do is extract the content from set of files or from the specified folder. The structure look like in all the xml files,

...
<FAQs>
<content> test</content>
<creator>myname</creator>
</FAQs>
...

How this can be achieved using php?

Thanks in advance.

1
  • This is a google question.... Commented Dec 16, 2011 at 6:35

1 Answer 1

2
  • Get all the files, e.g. with glob
  • iterate over the files with a loop
  • load the files with simplexml_load_file
  • Now you've got objects of the XMLs
Sign up to request clarification or add additional context in comments.

Comments

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.