Skip to content

Tag: xml-parsing

convert string to xml in PHP

When I use simplexml_load_file from a webservice, it returns But, I cannot parse it as XML to get the attributes. I need it to be formatted as such: and then this code works: I tried str_replace and decoding, without success. Answer The contents of the “string” element is an XML document itself – stored in an text node. You can

Converting KML to GeoJson

I’m having huge issues doing this so once again i come for help. I have this massive file which contains all the DMA’s for Nielson what i need to do with php somehow is parse through each and get the data from and the coordinates but they have to be outputted in this format anyone have any idea how to