Professional Documents
Culture Documents
УНОС И ПРИКАЗ XML
УНОС И ПРИКАЗ XML
WebForm – Adresar.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Xml;
using System.Data;
namespace Working_with_XML
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Ime.AppendChild(xmlIme);
Prezime.AppendChild(xmlPrezime);
Adresa.AppendChild(xmlAdresa);
Osoba.AppendChild(Ime);
Osoba.AppendChild(Prezime);
Osoba.AppendChild(Adresa);
xdoc.DocumentElement.AppendChild(Osoba);
xdoc.Save(Server.MapPath("Adresar.xml"));
XML – Adresar.xml
<?xml version="1.0" encoding="utf-8" ?>
<Adresar>
<Osoba>
<Ime>
</Ime>
<Prezime>
</Prezime>
<Adresa>
</Adresa>
</Osoba>
</Adresar>