This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


Modifying Data in an XML Document



Download 21,46 Mb.
Pdf ko'rish
bet1656/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1652   1653   1654   1655   1656   1657   1658   1659   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Modifying Data in an XML Document

Finally, as you would hope, LINQ to XML provides numerous ways to insert, delete, copy, and

update XML content. Adding new XElements to an existing XElement (or XDocument) is no harder than

calling the Add() method, which adds the data to the end of the element/document. As an alterna-

tive, you can call AddFirst() to add the item to the top of the element/document or AddAfterThis()/

AddBeforeThis() to insert data at a specific location.

Updating or deleting content is also very straightforward. After constructing a LINQ query

statement to identify the item (or items) you wish to tinker with, simply call ReplaceContent() (for

updating) or Remove()/RemoveContent() (for deletion of data). By way of a simple example, consider

the following code, which adds a set of new  elements to the incoming XElement parameter:

static void AddNewElements(XElement doc)

{


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1652   1653   1654   1655   1656   1657   1658   1659   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish