Autor Beitrag
MBaier
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 29.05.12 10:19 
Hallo,

beim mir kommt folgende Exception
"Dem Inhalt können keine Nichtleerzeichen hinzugefügt werden"
wenn ich diese Codezeile ausführe:

ausblenden C#-Quelltext
1:
XDocument datadocMitarbeiter = new XDocument(l_dsData.GetXml());					


(Ich initialisier ein XDocument anhand eines DataSets.
Inhalt der XML: <NewDataSet>\r\n <Table>\r\n <mitarbnr>1012</mitarbnr>\r\n usw..)

Weiß jemand was genau ich falsch mache?
Mit freundlichen Grüßen

Michael B.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4796
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 29.05.12 11:15 
Hallo MBaier,

probiere mal
ausblenden C#-Quelltext
1:
XDocument datadocMitarbeiter = XDocument.Parse(l_dsData.GetXml());					


Bisher verwendest du den XDocument-Konstruktor (Object[]), der aber zum Konstruieren des XDocument aus XElement-Objekten gedacht ist.

Für diesen Beitrag haben gedankt: MBaier
MBaier Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 29.05.12 11:24 
Vielen Dank, so funktionierts !