I am working on xml feeds and I have few xml files of two formats which are very similar:
XML 1 format
c<date><id><time>.xml XML 2 format
c<date><id><time><revision>.xml where:
-
Cis always 1 char -
DATEis always char format -
IDis at least 5 char but could increase time to time. -
TIMEs always 4 char format -
REVISIONis always 4 letter format
now you can understand the issue is to separate the first format from the second format when the ID changes dynamically.
I am using preg_match alongside regex to match the whole format but my real question is there any way of actually matching the formats even if the id changes dynamically into 7-8-9 chars?
I am not sure if I was clear, please advice in case not.
Can anyone help or suggest?
Thanks in advance
No comments:
Post a Comment