Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ASP.net (C#) .net 1.1 xml dokumente erstellen

Empfohlene Antworten

Hi zusammen,

ich stehe gerade vor einem problem.

Ich möchte gerne ein neues xml Dokument anlegen. Leider hbae ich für das erstellen eines XML dokumentes kein beispiel gefunden und erstelle mir ein dokument daher z.z. so


public XmlDocument xmlreturn(string str)

		{

			string temp = @"<Test><User><Name>"+str+"</Name></User></Test>";

			XmlDocument resultDoc = new XmlDocument();

			resultDoc.LoadXml(temp);

			return resultDoc;

		}

kann ich hier nicht ähnlich vorgehen wie bei einem TreeNode bzw. bei einer TreenodeCollection? Denn leider finde ich keine Add methode bzw. wenn ich mir ein xmlnode anlege kann ich für dieses node keinen namen vergeben.

Ich hoffe das ich mich halbwegs klar ausgedrückt habe ... falls nicht einfach bescheid geben was euch fehlt.

Hier ein Beispiel:


...

      XmlDocument xmlDoc = new XmlDocument();

      XmlNode xmlNode = xmlDoc.CreateElement("Node1");

      xmlDoc.AppendChild(xmlNode);


      XmlAttribute xmlAttr = xmlDoc.CreateAttribute("attribute");

      xmlAttr.Value = "attribute value";

      xmlNode.Attributes.Append(xmlAttr);


      XmlNode xmlNode2 = xmlDoc.CreateElement("Node2");

      xmlNode2.InnerText = "node value";

      xmlNode.AppendChild(xmlNode2);

...

ak thx das habe ich gesucht :D

manchmal muss man einfach den weg gezeigt bekommen

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.