Convert XML to TXT using a script
lmgf81
Posted messages
8
Registration date
Status
Membre
Last intervention
-
moebius_eye Posted messages 152 Registration date Status Membre Last intervention -
moebius_eye Posted messages 152 Registration date Status Membre Last intervention -
Hello,
I have a client file in xml format that I would like to convert to txt format.
I also need a specific number of characters for each part.
First 10 characters for the code, 20 for the name, 20 for the address....
Is it possible to create a script that can do this?
Thank you in advance for your help.
Configuration: Windows 7 / Safari 535.19
I have a client file in xml format that I would like to convert to txt format.
I also need a specific number of characters for each part.
First 10 characters for the code, 20 for the name, 20 for the address....
Is it possible to create a script that can do this?
Thank you in advance for your help.
Configuration: Windows 7 / Safari 535.19
4 réponses
lmgf81
Posted messages
8
Registration date
Status
Membre
Last intervention
No, because there are the suitcases to remove, put everything on one line while managing the spaces for my character count requirement.
once $data with the file you search for the data using strstr("<CLTFNOM>");
working with the indices ....
otherwise there's a pretty good function
$tableau=explode($separator,$file); ...
you recover structure not structure ...
example $separator="<client> ";
you have the xml per client you loop afterwards by the separators of the XML structure ...
In short ...
working with the indices ....
otherwise there's a pretty good function
$tableau=explode($separator,$file); ...
you recover structure not structure ...
example $separator="<client> ";
you have the xml per client you loop afterwards by the separators of the XML structure ...
In short ...