Jump to content

Recommended Posts

this is what i have so far:

 

$var=$_POST["fname"];
$xmlDoc = new DOMDocument();
$xmlDoc->loadXML($var);

 

 

I would like to use something similar to this included in it before sql insert:

for($c = 0; $c<$node->length; $c++) 
{	

 

 

1 root, 4 parents and varying childs I believe?

<node>

<building>Number 65</building>

<workers><label>executive</label><names>john</names><label>cook</label><names>terry</names><label>waitress</label><names>jill</names><label>buser</label><names>4564646</names><label>Main</label><number>45564646</number><label>home fax</label><number>45964646</number></workers>


<food><label>breakfast</label><meal>eggs</meal><label>lunch</label><meal>turkey</meal><label>dinner</label><meal>steak</meal></food>


<addresses><label>Home</label><Country>usa</Country><Street>123 mulberry ln </Street><ZIP>57888</ZIP><City>teledo</City><State>Ohio</State><label>location</label><Street>turnpike east 23</Street><City>danbury</City><State>Connecticut</State><Country>USA</Country></addresses>

<building>Number 66</building> etc...

</node>

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/247150-need-to-read-this-xml-in-php-please/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.