Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS transform .txt with just specific lines to xml

$
0
0

Hi,

i asked yesterday a question but today i noticed that it wasn't really clear, so i think its the best to make a new threat.

I get .txt output files from an device which looks like that:

Server="abc"

Date="xx.xx.xxxx"

id="xxxx"

value1="xxxxx"

value2="xxxxx"

value3="xxxxx"

method="abc"

.....

Now i want to convert this .txt files with SSIS to an XML file with an special formatation, where i just need specific lines from the .txt file. I found this site, which looks at first very good for my problem, but in my cases i just .txt files and can't convert that everytime to an database table: https://www.codeproject.com/Articles/635956/How-to-export-data-from-database-tables-to-an-XML

Is it possible to convert a normal .txt file to an XML with SSIS? Or do i need everytime an database table for that?

A other problem, as i told you, i just need a few lines from this .txt file. I can't find a way in SSIS to fetch specific lines. Is it possible to specify which line number i want to fetch for my xml?

My XML should have an specifc format like this, where i just want to have the information from some lines of the txt. file.

     
<Data Section><id_values><id="123"><method>"abc"</method></id></id_values></Data Section>

Do anybody know if this is possible to do that from an .txt file?

Thank you very much for every help:-)


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>