php, extract data from a non-standard xml document
Posted
by
Michael
on Stack Overflow
See other posts from Stack Overflow
or by Michael
Published on 2010-12-25T15:11:19Z
Indexed on
2010/12/25
17:54 UTC
Read the original article
Hit count: 212
I have some kind xml content I need to extract the information and store it into database
<xml file="136000000-136100000">
<Id>136000000</Id>
<Name>Sem Serxy</Na me>
<Email>[email protected]</Email>
<DateRegistration>10/13/2010 1:49:30 AM</DateRegistration>
</xml>
<xml file="136000000-136100000">
<Id>136000001</Id>
<Name>God Deckor</Name>
<Email>[email protected]</Email>
If I try simple xml load is not working as the document doesn't seem to be valid xml. I can use regex to extract the info with preg_match_all but I feel this is not the right way as the data is already well structured. Any other method ?
© Stack Overflow or respective owner