Convert XML to TXT using a script
lmgf81
Posted messages
8
Registration date
Status
Member
Last intervention
-
moebius_eye Posted messages 152 Registration date Status Member Last intervention -
moebius_eye Posted messages 152 Registration date Status Member 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 answers
-
To convert it to .txt, just open Notepad and copy the content of your xml into it.
-
A script::: it's not possible to record anything..
In PHP, it's really simple... -
C'est-à-dire, comment fais-tu ? Je suis nul !!!
-
-
-
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 ...
-
-
What languages do you master? I have a solution in Python with the XML library, in Java, and a more complicated one in PHP.
But it seems like you didn't look very hard, because you would have come across plenty of libraries capable of doing that in 3 lines of code...