I would like to populate a table with data from an XML file and was thinking along the lines of:

1.) Create the XML data: 

```
<menu>
  <pizza>
    <regular>
      <item name="Tomato Cheese">Tomato Cheese
        <price size="small">1</price>
        <price size="large">2</price>
        <description>A</description>
      </item>
      <item name="Onion">Onion
        <price size="small">3</price>
        <price size="large">4</price>
        <description>B</description>
      </item>
    </regular>
  </pizza>
</menu>

```

2.) Create the table in HTML: 

```
<table border="1">
  <thead>
    <tr>
      <th rowspan="2">Item </th>
      <th rowspan="2">Description</th>
      <th colspan="2">Price</th>
    </tr>
    <tr>
      <th>Small</th>
      <th>Large</th>
    </tr>
  </thead>
  <tbody>
    ...

```

3.) Use a foreach statement on an XPath query: 

```
 foreach  ($xml->xpath('/menu/pizza/descendant::item') as $item)
        {
            print "<tr><td>".$item."</td>" ;
        } 

```

This works great for the first row, but I can't figure out how to populate the rest of the columns.