Click to See Complete Forum and Search --> : Very Difficult XML To Parse For Me


mj9999
02-25-2009, 12:03 PM
I am trying to parse some XML to MySQL, which I have already accomplished a few times with simple XML. However, now I am trying to parse some XML that is very difficult for me and I can't figure it out. Part of the file is below. As you can see, there is a Category and then another Category between the main Category. The Site data is between them. I am trying to parse this data structure.

id | category | title | description


<Catalog>
<Category>
<Name>Business to Business</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
<Site>
<Id>REGEASY</Id>
<Title><![CDATA[Registry Easy - #1 Converting Registry Cleaner & System Optimizer.]]></Title>
<Description><![CDATA[Stunning Conversions With Extremely Low Refund Rate. Dedicated Affiliate Support. Extraordinary Customer Service. Any Kind Of Conversion Tracking & Multiple Landing Pages. Talk To Us! Http://www.cheesesoft.com/affiliates/registry-easy/.]]></Description>
</Site>
<Category>
<Name>Education</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
</Category>
<Category>
<Name>Publishing</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
</Category>
</Category>
<Category>
<Name>Health & Fitness</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
<Site>
<Id>REGEASY</Id>
<Title><![CDATA[Registry Easy - #1 Converting Registry Cleaner & System Optimizer.]]></Title>
<Description><![CDATA[Stunning Conversions With Extremely Low Refund Rate. Dedicated Affiliate Support. Extraordinary Customer Service. Any Kind Of Conversion Tracking & Multiple Landing Pages. Talk To Us! Http://www.cheesesoft.com/affiliates/registry-easy/.]]></Description>
</Site>
<Category>
<Name>Addiction</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
</Category>
<Category>
<Name>Diet</Name>
<Site>
<Id>SURVEY272</Id>
<Title><![CDATA[Converting At 1 In 14 Hops $1.37 Epc To Affiliates - Must See!!!]]></Title>
<Description><![CDATA[Sales Copy By Top Copywriter In The World. Best Converting Survey Site. Promote This Site And Earn More Guaranteed! Makemoneytakingsurveys.org/affiliates.php.]]></Description>
</Site>
</Category>
</Category>
<Catalog>