# XML Problem with tags

**URL:** <https://forum.kirupa.com/t/xml-problem-with-tags/314080>\
**Category:** programming\
**Created:** [September 17, 2010, 3:54pm UTC](https://forum.kirupa.com/t/xml-problem-with-tags/314080 "2010-09-17T15:54:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drymetal](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@drymetal](https://forum.kirupa.com/u/drymetal)\
**Post date:** [September 17, 2010, 3:54pm UTC](https://forum.kirupa.com/t/xml-problem-with-tags/314080/1 "2010-09-17T15:54:37Z")

</div>

Hey everyone. First, this site seems pretty informative - particularly the blogs. You’d be surprised how many sites don’t have useful information on XML. 🙂

I am trying to write a php file that when called with a cron job will send an XML file to a server - and will capture the response and either insert it into a db or into an xml file on the server. How to do either - is beyond me…but I’ll worry about those later.

Right now I am stuck on tags. Everything I have read on the blogs of this site - says that tags have to open and close.

The distributor we are trying to work with - sent us an example of what the XML might look like coming back to us:

```auto
 
<?xml version="1.0" encoding="utf-8" ?>
- <inventory>
- <itemlist>
<item prodid="AA02" quantity="42" price="1.16" mfgitem="AA02" mfgname="MAPLE LEAF PRESS INC" /></itemlist> </inventory>

```

As you can see - the inventory and itemlist tags open and close. But what about the tag that starts as: \<item prodid= ? There is a bunch of stuff in that tag and it just closes with /\> ???

So what in the world would the variables look like to put this into a database or into an xml file? Thanks for any help. I mean it. This is proving more frustrating than my cat. ☹
