Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet286/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   282   283   284   285   286   287   288   289   ...   453
276

CHAPTER 13
Working With XML Data
FIgURE 13-2: 
The example outputs the message content in the XML document.
USINg XMLUTIL
The IronPython 
Tutorial
directory contains an interesting module, 
XMLUtil.py
. Normally, a 
tutorial module wouldn’t require much discussion in a book because the tutorial modules normally 
address the special need of teaching someone how to use IronPython. This module is a little differ-
ent, however, because you could possibly use it in an application to reduce the work you must per-
form. It’s important to remember that 
XMLUtil.py
is a tutorial script, so you should make a copy of 
it and modify it as needed to meet specific needs in your application. The following sections describe 
XMLUtil.py
in more detail.
Loading and Viewing the XMLUtil Module
The example in this section assumes that you’ve loaded the 
XMLUtil
module from the IronPython 
Tutorial
directory. The following steps show you how to load this module manually so you can see 
the content.
1.
Open the IronPython console.
2.
Type 
import sys
and press Enter. This command imports the 
sys
module so that you can 
add the required directory to it.
3.
Type 
sys.path.append(‘C:/Program Files/IronPython 2.6/Tutorial‘)
and press 
Enter (make sure you change the path information to match the location of your IronPython 
installation). The 
XMLUtil.py
module exists in the 
Tutorial
directory. Using this module is 
fine for experimentation, but be sure you copy the 
XMLUtil.py
module to another location 
for other uses.
Remember that you can use forward slashes (/) for a path to avoid using double 
backslashes (\\). Either form works fine with IronPython, but the forward slashes 
tend to be easier to read.

Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   282   283   284   285   286   287   288   289   ...   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