[solved]Modify a text file

massimopasqualimassimopasquali Member Posts: 82
edited 2016-11-08 in Entrepreneur Solution
hello guys,

I have to modify a text file (for example : pippo.xml).

I need to change a raw in the file

FROM

TestoFile2 := '<Prestazione xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation="file:./xsd/A/A40_0050.xsd" cod_servizio="A40" cod_flusso="0050">'

To

<Prestazione FileRicevutoVendita="file:./xsd/A/A40_0050.xsd" cod_servizio="A40" cod_flusso="0050">


Actualy I have used the sentence below to replace the raw FROM -> TO

Pos := STRPOS(TestoFile2,'xmlns');
FileXml2.WRITE(PADSTR('FileRicevutoVendita="file:./xsd/A/A40_0050.xsd" cod_servizio="A40" cod_flusso="0050">', STRLEN(TestoFile2) - (Pos - 1)));

But don't Work, this is the result. :

'<Prestazione FileRicevutoVendita="file:./xsd/A/A40_0050.xsd" cod_servizio="A40" cod_flusso="0050"> '

I don't want the blank spaces after ">". The question is : IS A POSSIBLE TO REPLACE ALL RAW WITH A NAVISION'S KEYWORD?

I need to have this result :

<Prestazione FileRicevutoVendita="file:./xsd/A/A40_0050.xsd" cod_servizio="A40" cod_flusso="0050">

without blank spaces.

thanks

Comments

Sign In or Register to comment.