Converting sdlxliff files into txt via SDL API

Hello,
Does anyone have a sample txt file after the API automatically processes xliff file as instructed in?
http://producthelp.sdl.com/SDK/BatchTaskApi/2017/html/1daf8da9-ea35-4dc7-a92b-31d20d9c8537.htm

We would like to take a look at the output file to see if it will fit our needs before implementing any new codes into our API.

Thank you.

  • HI Marcia,

    All that sample does is add a semicolon between the source and target and print it out on one line:

    _outFile.WriteLine(item.Source + ";" + item.Target);

    Also, it would only take 5 or 10 minutes or so to create the entire program.
    Here is a sample txt file from a random sdlxliff file I made:

    ISegments are printed as plain text when passed to the streamwriter.

    <cf font="Arial" size="10.5" color="252525">Deutsch ist die meist verbreitete<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Muttersprache" tooltip="Muttersprache">Muttersprache</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">in der<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Europ%C3%A4ische_Union" tooltip="Europäische Union">Europäischen Union</hyperlink><cf font="Arial" size="10.5" color="252525">.</cf><hyperlink value="https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-24">[24]</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">Der deutsche<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Sprachraum" tooltip="Sprachraum">Sprachraum</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">überschreitet Staatsgrenzen und umfasst<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Deutschland" tooltip="Deutschland">Deutschland</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/%C3%96sterreich" tooltip="Österreich">Österreich</hyperlink><cf font="Arial" size="10.5" color="252525">, die<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Deutschschweiz" tooltip="Deutschschweiz">Deutschschweiz</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Liechtenstein" tooltip="Liechtenstein">Liechtenstein</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Luxemburg" tooltip="Luxemburg">Luxemburg</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Ostbelgien" tooltip="Ostbelgien">Ostbelgien</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Südtirol" tooltip="Südtirol">Südtirol</hyperlink><cf font="Arial" size="10.5" color="252525">, das<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Elsass" tooltip="Elsass">Elsass</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">und<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Lothringen" tooltip="Lothringen">Lothringen</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">sowie<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Nordschleswig" tooltip="Nordschleswig">Nordschleswig</hyperlink><cf font="Arial" size="10.5" color="252525">.</cf>;<cf font="Arial" size="10.5" color="252525">German is the most common<cf style="apple-converted-space">  </cf> </cf> <hyperlink value="https://de.wikipedia.org/wiki/Muttersprache" tooltip="Muttersprache">Mother tongue</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">in the<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Europ%C3%A4ische_Union" tooltip="Europäische Union">EU</hyperlink><cf font="Arial" size="10.5" color="252525">.</cf> <hyperlink value="https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-24">[24]</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">Of the German<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Sprachraum" tooltip="Sprachraum">language</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">transcend State borders, and includes<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Deutschland" tooltip="Deutschland">Germany</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/%C3%96sterreich" tooltip="Österreich">Austria</hyperlink><cf font="Arial" size="10.5" color="252525">, the<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Deutschschweiz" tooltip="Deutschschweiz">German Switzerland</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Liechtenstein" tooltip="Liechtenstein">Liechtenstein</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Luxemburg" tooltip="Luxemburg">Luxembourg</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Ostbelgien" tooltip="Ostbelgien">East Belgium</hyperlink><cf font="Arial" size="10.5" color="252525">,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Südtirol" tooltip="Südtirol">South Tyrol</hyperlink><cf font="Arial" size="10.5" color="252525">, the<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Elsass" tooltip="Elsass">Alsace</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">and<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Lothringen" tooltip="Lothringen">Lorraine</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">and<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Nordschleswig" tooltip="Nordschleswig">North Schleswig</hyperlink><cf font="Arial" size="10.5" color="252525">.</cf>
    <cf font="Arial" size="10.5" color="252525">Außerdem ist Deutsch eine<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Minderheitensprache" tooltip="Minderheitensprache">Minderheitensprache</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">in einigen europäischen, z. B. in<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Rum%C3%A4nien" tooltip="Rumänien">Rumänien</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">und außereuropäischen Ländern,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Nationalsprache" tooltip="Nationalsprache">Nationalsprache</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">im afrikanischen<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Namibia" tooltip="Namibia">Namibia</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">und zählt zu den zehn wichtigsten Sprachen der Welt.</cf><hyperlink value="https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-25">[25]</hyperlink>;<cf font="Arial" size="10.5" color="252525">Also is a German<cf style="apple-converted-space">  </cf> </cf> <hyperlink value="https://de.wikipedia.org/wiki/Minderheitensprache" tooltip="Minderheitensprache">Minority language</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">in several European, such as in<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Rum%C3%A4nien" tooltip="Rumänien">Romania</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">and non-European countries,<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Nationalsprache" tooltip="Nationalsprache">language</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">in the African<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Namibia" tooltip="Namibia">Namibia</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">and is one of the ten most important languages in the world.</cf> <hyperlink value="https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-25">[25]</hyperlink>
    https://de.wikipedia.org/wiki/Muttersprache;https://en.wikipedia.org/wiki/Binary_code
    Muttersprache;Native language
    https://de.wikipedia.org/wiki/Europ%C3%A4ische_Union;https://de.Wikipedia.org/wiki/Europ%C3%A4ische_Union
    Europäische Union;European Union
    https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-24;https://de.Wikipedia.org/wiki/Deutsche_Sprache#cite_note-24
    https://de.wikipedia.org/wiki/Sprachraum;
    Sprachraum;Sprachraum
    https://de.wikipedia.org/wiki/Deutschland;
    Deutschland;Germany
    https://de.wikipedia.org/wiki/%C3%96sterreich;https://de.Wikipedia.org/wiki/%C3%96sterreich
    Österreich;Austria
    https://de.wikipedia.org/wiki/Deutschschweiz;
    Deutschschweiz;Languages of Switzerland#German
    https://de.wikipedia.org/wiki/Liechtenstein;
    Liechtenstein;Liechtenstein
    https://de.wikipedia.org/wiki/Luxemburg;
    Luxemburg;Luxembourg
    https://de.wikipedia.org/wiki/Ostbelgien;
    Ostbelgien;East Belgium
    https://de.wikipedia.org/wiki/Südtirol;
    Südtirol;South Tyrol
    https://de.wikipedia.org/wiki/Elsass;
    Elsass;Alsace
    https://de.wikipedia.org/wiki/Lothringen;
    Lothringen;Lorraine
    https://de.wikipedia.org/wiki/Nordschleswig;
    Nordschleswig;North Schleswig
    https://de.wikipedia.org/wiki/Minderheitensprache;
    Minderheitensprache;Minority language
    https://de.wikipedia.org/wiki/Rum%C3%A4nien;https://de.Wikipedia.org/wiki/rum%C3%A4nien
    Rumänien;Romania
    https://de.wikipedia.org/wiki/Nationalsprache;
    Nationalsprache;National language
    https://de.wikipedia.org/wiki/Namibia;
    Namibia;Namibia
    https://de.wikipedia.org/wiki/Deutsche_Sprache#cite_note-25;https://de.Wikipedia.org/wiki/Deutsche_Sprache#cite_note-25
    <cf font="Arial" size="10.5" color="252525">Die<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Standardsprache" tooltip="Standardsprache">Standardsprache</hyperlink><cf font="Arial" size="10.5" color="252525">, das<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Standarddeutsch" tooltip="Standarddeutsch">Standarddeutsche</hyperlink><cf font="Arial" size="10.5" color="252525">, setzt sich aus<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Standardvariet%C3%A4t" tooltip="Standardvarietät">Standardvarietäten</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">der<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Dachsprache" tooltip="Dachsprache">Dachsprache</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">zusammen.</cf>;<cf font="Arial" size="10.5" color="252525">Die<cf style="apple-converted-space"> </cf></cf> <hyperlink value="https://de.wikipedia.org/wiki/Standardsprache" tooltip="Standardsprache">Default language</hyperlink> <cf font="Arial" size="10.5" color="252525">, das<cf style="apple-converted-space"> </cf></cf> <hyperlink value="https://de.wikipedia.org/wiki/Standarddeutsch" tooltip="Standarddeutsch">Standard German</hyperlink> <cf font="Arial" size="10.5" color="252525">, consists of<cf style="apple-converted-space">  </cf> </cf> <hyperlink value="https://de.wikipedia.org/wiki/Standardvariet%C3%A4t" tooltip="Standardvarietät">Standard varieties</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">the<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Dachsprache" tooltip="Dachsprache">roof language</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">together.</cf>
    <cf font="Arial" size="10.5" color="252525">Der deutsche Sprachraum bestand ursprünglich allein aus einer Vielzahl von<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Hochdeutsche_Dialekte" tooltip="Hochdeutsche Dialekte">hochdeutschen</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">und<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Niederdeutsche_Dialekte" tooltip="Niederdeutsche Dialekte">niederdeutschen</hyperlink><hyperlink value="https://de.wikipedia.org/wiki/Mundart" tooltip="Mundart">Mundarten</hyperlink><cf font="Arial" size="10.5" color="252525">, die in einem<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Dialektkontinuum" tooltip="Dialektkontinuum">Dialektkontinuum</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">miteinander verbunden sind.</cf>;<cf font="Arial" size="10.5" color="252525">Of the German-speaking countries originally only consisted of a variety of<cf style="apple-converted-space">  </cf> </cf> <hyperlink value="https://de.wikipedia.org/wiki/Hochdeutsche_Dialekte" tooltip="Hochdeutsche Dialekte">High German</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">and<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Niederdeutsche_Dialekte" tooltip="Niederdeutsche Dialekte">low German</hyperlink><hyperlink value="https://de.wikipedia.org/wiki/Mundart" tooltip="Mundart">dialects</hyperlink><cf font="Arial" size="10.5" color="252525">, a<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Dialektkontinuum" tooltip="Dialektkontinuum">dialect continuum</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">are connected.</cf>
    https://de.wikipedia.org/wiki/Standardsprache;
    Standardsprache;
    https://de.wikipedia.org/wiki/Standarddeutsch;
    Standarddeutsch;Standard German
    https://de.wikipedia.org/wiki/Standardvariet%C3%A4t;https://de.Wikipedia.org/wiki/Standardvariet%C3%A4t
    Standardvarietät;Standard variety
    https://de.wikipedia.org/wiki/Dachsprache;
    Dachsprache;Roof language
    https://de.wikipedia.org/wiki/Hochdeutsche_Dialekte;https://de.Wikipedia.org/wiki/Hochdeutsche_Dialekte
    Hochdeutsche Dialekte;High German dialects
    https://de.wikipedia.org/wiki/Niederdeutsche_Dialekte;https://de.Wikipedia.org/wiki/Niederdeutsche_Dialekte
    Niederdeutsche Dialekte;Low German dialects
    https://de.wikipedia.org/wiki/Mundart;
    Mundart;
    https://de.wikipedia.org/wiki/Dialektkontinuum;
    Dialektkontinuum;Dialect continuum
    <cf font="Arial" size="10.5" color="252525">Die<cf style="apple-converted-space"> </cf></cf><hyperlink value="https://de.wikipedia.org/wiki/Germanistik" tooltip="Germanistik">Germanistik</hyperlink><cf style="apple-converted-space" font="Arial" size="10.5" color="252525"> </cf><cf font="Arial" size="10.5" color="252525">ist die akademische Disziplin der Geisteswissenschaften, die die deutsche Sprache und deutschsprachige Literatur in ihren historischen und gegenwärtigen Formen erforscht, dokumentiert und vermittelt.</cf>;<cf font="Arial" size="10.5" color="252525">Die<cf style="apple-converted-space"> </cf></cf> <hyperlink value="https://de.wikipedia.org/wiki/Germanistik" tooltip="Germanistik">German language and literature</hyperlink> <cf style="apple-converted-space" font="Arial" size="10.5" color="252525">  </cf> <cf font="Arial" size="10.5" color="252525">is the academic discipline of the humanities that researches the German language and German literature in its historical and contemporary forms, documented and conveyed.</cf>
    https://de.wikipedia.org/wiki/Germanistik;
    Germanistik;German studies
    

  • Hi Jesse,
    Thank you very much for your reply. We will take a look at this sample.

    Best!