Jump to content

Creating a XML file from table with multiple records


pioneerx01

Recommended Posts

Yes, I am going to be one of those guys today. I have never done XML anything, besides past 2-3 hours or so, and I am getting frustrated. I have learned how to create simple XML files and save them. I am however having hard time figuring out how to create and XML file when trying to access an table from databse. I am looking to export from "registered_users" table all "registrations" and include "first_name", "last_name" and "age"

 

Sample:

 

<registered_users>

   <registration>

      <first_name>Bob</first_name>

      <last_name>Smith</last_name>

      <age>36</age>

   </registration>

   <registration>

      <first_name>Jack</first_name>

      <last_name>Miller</last_name>

      <age>45</age>

   </registration>

</registered_users>

 

It would be nice if the file would be saved as spearate "all_users.xml"

 

Any help would be appreciated

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.