Converstion of Data from XML To php Array
Posted: Sun Jul 05, 2009 11:45 pm
Dear Friends hi,
I am facing a problem I am extracting the data from the other server in the form of XML, now i want to save that data in my database tables, i am using a scheme to covert that into an array from that xml data. For this first of all i create an xml text file, that xml file than changed into an array. As this xml file which i am getting from the other server has lot of data. So when i create the xml text file full data from the xml is not put on the xml text file, it has been cut off between the center.
The code i am using is:
$fh = fopen("myfile.xml", "w");
fwrite($fh, $xml);
This $xml has all the data which i am getting from the other server.
Please give me any specific way which is usefull for me regarding the creation of xml text file. and i got the full xml text data in that xml text file.
Best Regards and Very Thankful.
I am facing a problem I am extracting the data from the other server in the form of XML, now i want to save that data in my database tables, i am using a scheme to covert that into an array from that xml data. For this first of all i create an xml text file, that xml file than changed into an array. As this xml file which i am getting from the other server has lot of data. So when i create the xml text file full data from the xml is not put on the xml text file, it has been cut off between the center.
The code i am using is:
$fh = fopen("myfile.xml", "w");
fwrite($fh, $xml);
This $xml has all the data which i am getting from the other server.
Please give me any specific way which is usefull for me regarding the creation of xml text file. and i got the full xml text data in that xml text file.
Best Regards and Very Thankful.