473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML Datei schreiben

Hallo,

wie kann ich so eine Datei unter .Net schreiben C++ oder C#.

Bitte mit Funktionsaufrufen. Vielen Dank.

Grüße Andrea

<Product>
<ProgramNumber>2</ProgramNumber>
<ProductNumber>598</ProductNumber>
<CreatePanelCode>true</CreatePanelCode>
<Length>378</Length>
<Width>175</Width>
<Thickness>2</Thickness>
<AfterRunning>1</AfterRunning>
<HandingOverSpeed>100</HandingOverSpeed>
<Comment>Original pcb with no read</Comment>
<OffsetStopper>10</OffsetStopper>
<Tooling1>false</Tooling1>
<Tooling2>true</Tooling2>
<Tooling3>true</Tooling3>
</Product>
<Position>
<id>1</id>
<Boardnumber>T 97</Boardnumber>
<PosX>-3</PosX>
<PosY>107</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout01.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009400991</CodeContent>
</Position>
<Position>
<id>2</id>
<Boardnumber>T 98</Boardnumber>
<PosX>-3</PosX>
<PosY>35</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout02.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009300992</CodeContent>
</Position>
<Position>
<id>3</id>
<Boardnumber>T 99</Boardnumber>
<PosX>-3</PosX>
<PosY>45</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout03.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009200993</CodeContent>
</Position>
<Position>
<id>4</id>
<Boardnumber>D 00</Boardnumber>
<PosX>-3</PosX>
<PosY>55</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>true</Read>
<LayoutFile></LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009411001</CodeContent>
</Position>
<Position>
<id>5</id>
<Boardnumber>K 01</Boardnumber>
<PosX>15.27</PosX>
<PosY>10.67</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>false</Read>
<LayoutFile>c:\files\layout0t.pcr</LayoutFile>
<Type>Text</Type>
<CodeContent>003</CodeContent>
</Position>
Nov 12 '05 #1
2 2479
Hello

how can I write and read with .Net the following file?

### with C#
### with C++

What is better?

Thanks.
Best regards
Andrea

<Product>
<ProgramNumber>2</ProgramNumber>
<ProductNumber>598</ProductNumber>
<CreatePanelCode>true</CreatePanelCode>
<Length>378</Length>
<Width>175</Width>
<Thickness>2</Thickness>
<AfterRunning>1</AfterRunning>
<HandingOverSpeed>100</HandingOverSpeed>
<Comment>Original pcb with no read</Comment>
<OffsetStopper>10</OffsetStopper>
<Tooling1>false</Tooling1>
<Tooling2>true</Tooling2>
<Tooling3>true</Tooling3>
</Product>
<Position>
<id>1</id>
<Boardnumber>T 97</Boardnumber>
<PosX>-3</PosX>
<PosY>107</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout01.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009400991</CodeContent>
</Position>
<Position>
<id>2</id>
<Boardnumber>T 98</Boardnumber>
<PosX>-3</PosX>
<PosY>35</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout02.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009300992</CodeContent>
</Position>
<Position>
<id>3</id>
<Boardnumber>T 99</Boardnumber>
<PosX>-3</PosX>
<PosY>45</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout03.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009200993</CodeContent>
</Position>
<Position>
<id>4</id>
<Boardnumber>D 00</Boardnumber>
<PosX>-3</PosX>
<PosY>55</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>true</Read>
<LayoutFile></LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009411001</CodeContent>
</Position>
<Position>
<id>5</id>
<Boardnumber>K 01</Boardnumber>
<PosX>15.27</PosX>
<PosY>10.67</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>false</Read>
<LayoutFile>c:\files\layout0t.pcr</LayoutFile>
<Type>Text</Type>
<CodeContent>003</CodeContent>
</Position>

Nov 12 '05 #2
Hallo Andrea,

Auf Deutsch solltest Du besser in microsoft.public.de.german.xml posten.

Ob Du Deine Dateien in C# oder in C++ scheibst macht von der
Geschwindigkeit her keinen grossen Unterscheid weil die
Lauftzeitumgebung des .NET Framework für beide Sprachen die gleiche ist.

Wenn Du Nur die Dateien sequentiell schreiben willst, dann schau dir die
XmlTextWriter Klasse an. Die Beschreibung mit Beispielcode findest Du
unter [0].

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

[0]
http://msdn.microsoft.com/library/en...Well-FormedXML
CreationWithXmlTextWriter.asp?frame=true
-----Original Message-----
From: Andrea Bauer [mailto:An**********@discussions.microsoft.com]
Posted At: Friday, January 21, 2005 11:55 AM
Posted To: microsoft.public.dotnet.xml
Conversation: XML Datei schreiben
Subject: XML Datei schreiben

Hallo,

wie kann ich so eine Datei unter .Net schreiben C++ oder C#.

Bitte mit Funktionsaufrufen. Vielen Dank.

Grüße Andrea

<Product>
<ProgramNumber>2</ProgramNumber>
<ProductNumber>598</ProductNumber>
<CreatePanelCode>true</CreatePanelCode>
<Length>378</Length>
<Width>175</Width>
<Thickness>2</Thickness>
<AfterRunning>1</AfterRunning>
<HandingOverSpeed>100</HandingOverSpeed>
<Comment>Original pcb with no read</Comment>
<OffsetStopper>10</OffsetStopper>
<Tooling1>false</Tooling1>
<Tooling2>true</Tooling2>
<Tooling3>true</Tooling3>
</Product>
<Position>
<id>1</id>
<Boardnumber>T 97</Boardnumber>
<PosX>-3</PosX>
<PosY>107</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout01.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009400991</CodeContent>
</Position>
<Position>
<id>2</id>
<Boardnumber>T 98</Boardnumber>
<PosX>-3</PosX>
<PosY>35</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout02.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009300992</CodeContent>
</Position>
<Position>
<id>3</id>
<Boardnumber>T 99</Boardnumber>
<PosX>-3</PosX>
<PosY>45</PosY>
<Angle>0</Angle>
<TestCode>true</TestCode>
<Read>true</Read>
<LayoutFile>c:\files\layout03.pcr</LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009200993</CodeContent>
</Position>
<Position>
<id>4</id>
<Boardnumber>D 00</Boardnumber>
<PosX>-3</PosX>
<PosY>55</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>true</Read>
<LayoutFile></LayoutFile>
<Type>DM</Type>
<CodeContent>ROM380009411001</CodeContent>
</Position>
<Position>
<id>5</id>
<Boardnumber>K 01</Boardnumber>
<PosX>15.27</PosX>
<PosY>10.67</PosY>
<Angle>0</Angle>
<TestCode>false</TestCode>
<Read>false</Read>
<LayoutFile>c:\files\layout0t.pcr</LayoutFile>
<Type>Text</Type>
<CodeContent>003</CodeContent>
</Position>

Nov 12 '05 #3

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

Similar topics

1
by: Peter Nikonevich | last post by:
Hallo! Ich habe eine Menudatei, die in alle Dateien eingebunden werden soll, die das menü anzeigen sollen. Die Menüdatei bindet ihrerseits 3 Javascript-Dateien ein die auf verschiedene...
1
by: Roland Mayr - Chipware | last post by:
Hallo Leute, habe folgendes Problem. Habe eine externe Datei (txt Format) verknüpft und kann diese erst löschen nachdem ich Access verlassen habe. Habe versucht die verknüpfte Tabelle im Access...
1
by: Marcel | last post by:
Es soll aus einem Access 2002 AddIn (VBA) heraus eine Excel-Datei geöffnet und möglichst direkt gedruckt werden. Der Dateiname der Excel-Datei ist bekannt. Zuvor oder dabei, sollen VBA-Daten in...
2
by: amir | last post by:
Hallo liebe Gemeinde, ich möchte aus einem Formular aus, eine bereits vorhandene Laufendenummer aus einer Tabelle.spalte auslese und dazu noch eine 1 addiere und dann das Ergebnis in ein...
1
by: Maik Rudolph | last post by:
Hallo NG, ich versuche mich schon seit einigen Tagen daran eine Datei per VBA umzubenennen. Und zwar möchte ich eine Textdatei in Access importieren, nur leider hat diese nicht die Endung *.txt...
12
by: Dennis Schulz | last post by:
hi alle, ich bin blutiger C Anfänger und hier ist mein Versuch ein Strukt in eine Datei zu schreiben, bzw anzuhängen. Leider wird die datei zwar angelegt aber nichts reingeschrieben. Besonders...
3
by: Matthias von Deetzen | last post by:
Hallo zusammen, ich suche eine Möglichkeit eine CSV Datei in einem DataGrid anzuzeigen. Mfg Matthias
1
by: BMP | last post by:
Ich habe hier eine PHP Datei und bräuchte mal eure Hilfe. In der Datei wird beim Aufruf das /Import Verzeichniss eingelesen und als Dropdown ausgegeben. Nun kann man unter dem Dropdown einen Button...
1
by: Thomas Bock | last post by:
Hi NG wie kann ich eine PDF-Datei ohne Acrobat lesen, insbesondere Textblöcke? Vielen Dank Thomas Bock
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.