FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


XML parsing





kevinalle
Hi.
I am making a MySQL database and I wnt to do PHP forms. The database is quite big, so I dont want to do the forms by hand.
I thaught there was an automated way to do this.

I exported the database structure and made an xml out of it. The xml is very simple, this is an example:
Code:
<?xml version="1.0"?>
<data>
 <TableName>
  <int>id</int>
  <varchar>name</varchar>
  <varchar>mail</varchar>
  <text>observations</text>
 </TableName>
</data>

where TableName is the name of the table, and <varchar>name</varchar> means there is a field named "name" whis is a varchar.

What I need to do is parse this XML and make an HTML form out of it. What is the easiest way of doing this?

Thanks,
K
Dougie1
This may help if you know your way about this site.
kevinalle
Ok.
I solved it.
I wa trying to use these functions but I had a complication: no standart.

I changes my xml from this:
Code:
<?xml version="1.0"?>
<data>
 <TableName>
  <int>id</int>
  <varchar>name</varchar>
  <varchar>mail</varchar>
  <text>observations</text>
 </TableName>
</data>


to this:
Code:
<?xml version="1.0"?>
<data>
 <table>
  <name>NAME</name>
    <fields> 
      <field>
      <type>int</type>
      <name>id</name>
    </field>
    <fields> 
      <field>
      <type>varchar</type>
      <name>name</name>
    </field>
    <fields> 
      <field>
      <type>varchar</type>
      <name>mail</name>
    </field>
    <fields> 
      <field>
      <type>text</type>
      <name>observations</name>
    </field>
   </fields>
  </table>
</data>


Thanks for helping!
Related topics
TrendyFlash Site Builder 1.0
Should I make a flash site?
Help making an AJAX messaging system
RSS Help PLease
php and am lost...
Validating
Can't download files after a Firefox auto update
ASPX XML parsing error help
rss 2.0 feeds
a regex help
Parse feed tags/urls using rss2html
Creating XML files using PHP
xml parsing
PHP XML Parsing
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.