Hallo,
ich sitze gerade hier vor einem Problem, bei dem ich nicht weiter komme.
Ich habe als Eingabe eine xml-Datei welche ca. so aussieht:
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
| <prism:MC ... xmlns:... xmlns:... xmlns:... <prism:MI Ref="..." MN="..." MT="..." InitializationMode="WhenAvailable"> <prism:MI.D> <sys:String>...</sys:String> </prism:MI.D> </prism:MI> <prism:MI Ref="..." MN="..." MT="..." InitializationMode="WhenAvailable"> <prism:MI.D> <sys:String>...</sys:String> </prism:MI.D> </prism:MI> </prism:MC> |
Ich lade es mittels:
Quelltext
1: 2: 3:
| XmlDocument document = new XmlDocument(); document.Load(..datei..); XmlElement rootElement = document.DocumentElement; |
Nun möchte ich ein komplettes Element <prism:MI bis </prism:MI> abspeichern und zu einem späteren Zeitpunkt wieder in ein XML-Document einfügen, soll also quasi eine 1:1 Kopie eines bestimmten Elements werden.
Leider scheiterte ich bisher hier.
Kann mir jemand helfen ?
DANKE