Professional IronPython


XML Namespaces (both stream level and Document Object Model, DOM)



Download 20,35 Mb.
Pdf ko'rish
bet283/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   279   280   281   282   283   284   285   286   ...   453
XML Namespaces (both stream level and Document Object Model, DOM):
http://www.w3.org/TR/REC-xml-names/


XSD Schemas: 
http://www.w3.org/2001/XMLSchema


XPath expressions: 
http://www.w3.org/TR/xpath


XSLT transformations: 
http://www.w3.org/TR/xslt


DOM Level 1 Core: 
http://www.w3.org/TR/REC-DOM-Level-1/


DOM Level 2 Core: 
http://www.w3.org/TR/DOM-Level-2/
Developing a Basic .NET XML Application
A .NET XML application will follow most of the same principles you use when working with a 
static language such as C# or Visual Basic.NET. In fact, you might not notice much difference at all 
except for the obvious structural requirements of a Python application. Consequently, you should 
find it easy to move your XML code over to IronPython because you really don’t have anything new 
to worry about. Listing 13-1 shows a simple XML application that creates an XML document, saves 
it to disk, reads it from disk, and then displays the content onscreen.
548592c13.indd 272
2/24/10 12:48:55 PM
www.finebook.ir


Using the .NET XML Functionality
 

 
273
DoM-oNLy SUPPoRT IN THE .NET FRAMEWoRk
It’s important to note that the .NET Framework supports DOM and not Simple API 
for XML (SAX). However, if you want SAX support, you can use the Python modules 
instead (see the “Working with xml.sax” section of this chapter). XML files include 
both data and context. In order to reconstruct the original dataset described by an 
XML file, you need a parser to read the text and then convert it to a usable object. 
DOM and SAX represent two different methods for interacting with XML documents 
without forcing the developer to create a parser. If you want more information about 
the DOM versus SAX approach to parsing XML parsers, check out the information at 
http://developerlife.com/tutorials/?p=28
and 
http://www.jamesh.id.au/
articles/libxml-sax/libxml-sax.html
. Here’s a summary of the DOM features.

Object-based.

Object module is created automatically.


Element sequencing is preserved.


High memory usage.


Slow initial data retrieval.


Best for complex data structures.


In-memory document updates are supported.


SAX takes a completely different approach than DOM. Here’s a summary of
the SAX features.

Event-based.

Object module is created by the application.


Element sequencing is ignored in favor of single events.


Low memory usage.


Fast initial data retrieval.


Best for simple data structures.


No document updates.



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   279   280   281   282   283   284   285   286   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
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