473,473 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need to generate a text file.


Hello,
I need to generate a flat text file where aeach is made up os fields and
space.

To automate the process, i want to define an xml file that describe the file
form mate in term of
<Lines>

<Line1>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

..

..

..

..

</Line1>

<Line2>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

..

..

..

..

</Line2>

</Lines>

This can always be done but i'am looking for best practices/good design
pattern in C#

Has anyone don anything similar?

Any comment will be highly appreciated.

JJ
Sep 29 '06 #1
3 1963
Look at XSLT for this

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Jens Jensen" wrote:
>
Hello,
I need to generate a flat text file where aeach is made up os fields and
space.

To automate the process, i want to define an xml file that describe the file
form mate in term of
<Lines>

<Line1>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

..

..

..

..

</Line1>

<Line2>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

<Field fieldlengh="" value=""></Field>

..

..

..

..

</Line2>

</Lines>

This can always be done but i'am looking for best practices/good design
pattern in C#

Has anyone don anything similar?

Any comment will be highly appreciated.

JJ
Sep 29 '06 #2
I read somewhere :
"
XSLT is used to transform an XML document into another XML document, or
another type of document that is recognized by a browser, like HTML and
XHTML. Normally XSLT does this by transforming each XML element into an
(X)HTML element.

"

My text file is not targeting any browser. Is XSLT still the best way to go?

Thanks

JJ
"Michael Nemtsev" <ne*****@msn.comskrev i en meddelelse
news:7F**********************************@microsof t.com...
Look at XSLT for this

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche


Sep 29 '06 #3
Hello jens,

If you have some template and need to fill it it's easy to use XSLT, but
it's only one approach
The second approach is to load your xml file and insert necessary info into
your nodes

jJI read somewhere :
jJ"
jJXSLT is used to transform an XML document into another XML document,
jJor
jJanother type of document that is recognized by a browser, like HTML
jJand
jJXHTML. Normally XSLT does this by transforming each XML element into
jJan
jJ(X)HTML element.
jJ"
jJ>
jJMy text file is not targeting any browser. Is XSLT still the best
jJway to go?
jJ>
jJThanks
jJ>
jJJJ
jJ>
jJ"Michael Nemtsev" <ne*****@msn.comskrev i en meddelelse
jJnews:7F**********************************@micros oft.com...
jJ>
>Look at XSLT for this

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
not
cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: no one | last post by:
I have been searching various boards trying to figure out how to generate an image along with other html. I intend to put the image in a table, but for now I am just having problem getting the...
2
by: grant | last post by:
Hi guys: I am try to build an online query application and would like to generate xml file like following: <survey name="Example Survey"> <question type="text" name="Title" required="yes"/>...
2
by: Stephen Tang | last post by:
Hi, I'm relatively new at this language, so I've been trying to find parallels to problems I've run into in the past. This is the hypothetical problem: I want to write a CD inventory...
3
by: Dennis M | last post by:
Hey everyone, I am curious what the performance impact of a custom control would be if it had a significant hierarchy of children. For example, 40 child controls, 5 levels deep, each control on...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: pcoppola | last post by:
Hello everybody First of all, I'm very new in MS Access. I have a table to store data about people. The fields are Name, Surname, e-mail, address, phone, and so on. I need to generate a...
0
by: raypjr | last post by:
Hi everyone. I need a little help with some parts of a word guessing game I'm working on. I have some parts done but unsure about others and could use a little advice. Any help is very much...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
10
by: subhadip | last post by:
Hi, I want to generate New mail alert for any mail client at client side . I want to check if any new mail has arrived in my inbox or not . the mail client be anything . I want to do this for...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.