Hey pritaeas sorry i was meant to post the sorce code after i solved it
so here is what i done
First of all i managed to pull the <CD> value out however it pulled out 5 of them , as i had 5 <CD> child nodes within the xml file. This was the code that pulled out all the child nodes
$jsonString = $jsonString.'], "childNodeHeading" : [';
foreach ($childNodeHeading as $element )
{
$jsonString = $jsonString.'"'.$element->getName().'" ,';
}
so this was the output from the php file when queried in the browser
{ "parentNode" : ["CATALOG" ],
"childNodeHeading" : ["CD" ,"CD" ,"CD" ,"CD" ,"CD" ],
"subChildNodeHeadings" : ["TITLE" ,"ARTIST" ,"COUNTRY" ,"COMPANY" ,"PRICE" ,"YEAR" ],
"subChildData" : [["Empire Burlesque","Bob Dylan","USA","Columbia","10.90","1985"],["Hide your heart","Bonnie Tyler","UK","CBS Records","9.90","1988"],
["Greatest Hits","Dolly Parton","USA","RCA","9.90","1982"],["Still got the blues","Gary Moore","UK","Virgin records","10.20","1990"],
["Eros","Eros Ramazzotti","EU","BMG","9.90","1997"]]}
i only needed one <CD> catalog to show as i am pasing this back later to an addXml.php file and it is used to create a new child node for the new data going to be passed in , so i modified the code above to this
$jsonString = $jsonString.'], "childNodeHeading" : [';
$i =1;
foreach ($childNodeHeading as $element )
{
$jsonString = $jsonString.'"'.$element->getName().'" ,';
if($i==1) break;
}
$jsonString = substr_replace($jsonString ,"",-1);
so as soon as it found one child node it would break the foreach loop , and in return give me back just one <CD>
i dont know if this is best practice but it does the job and i am able to add new data aswell.