Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
aa9d613c
Kaydet (Commit)
aa9d613c
authored
Nis 14, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleaned unuseful str function using
üst
956276cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
xmlext_iks.py
inary/sxml/xmlext_iks.py
+3
-3
xmlfile_iks.py
inary/sxml/xmlfile_iks.py
+6
-6
No files found.
inary/sxml/xmlext_iks.py
Dosyayı görüntüle @
aa9d613c
...
...
@@ -12,11 +12,11 @@
"""
xmlext is a helper module for accessing XML files using
xml.dom.minidom
. It is a convenient wrapper for some
ciksemel
. It is a convenient wrapper for some
DOM functions, and provides path based get/add functions
as in KDE API.
function names are mixedCase for compatibility with
minidom
,
function names are mixedCase for compatibility with
ciksemel
,
an 'old library'
this implementation uses ciksemel
...
...
@@ -75,7 +75,7 @@ def getNodeText(node, tagpath = ""):
if
child
.
type
()
==
iks
.
DATA
:
# KLUDGE: FIXME: python 2.x bug: force decoding as UTF-8
child_data
=
child
.
data
()
#print('child_data=', child_data.strip())
#
print('child_data=', child_data.strip())
return
child_data
.
strip
()
# in any case, strip whitespaces...
else
:
raise
XmlError
(
_
(
"getNodeText: Expected text node, got something else!"
))
...
...
inary/sxml/xmlfile_iks.py
Dosyayı görüntüle @
aa9d613c
...
...
@@ -16,7 +16,7 @@
high-level dom functions provided in xmlext module (and sorely lacking
in xml.dom :( )
function names are mixedCase for compatibility with
minidom
,
function names are mixedCase for compatibility with
ciksemel
,
an 'old library'
this implementation uses ciksemel
...
...
@@ -55,11 +55,11 @@ class XmlFile(object):
return
self
.
doc
def
parsexml
(
self
,
file
):
#
try:
self
.
doc
=
iks
.
parseString
(
str
(
file
)
)
return
self
.
doc
#
except Exception as e:
#
raise Error(_("File '{}' has invalid XML").format(file) )
try
:
self
.
doc
=
iks
.
parseString
(
file
)
return
self
.
doc
except
Exception
as
e
:
raise
Error
(
_
(
"File '{}' has invalid XML"
)
.
format
(
file
)
)
def
readxml
(
self
,
uri
,
tmpDir
=
'/tmp'
,
sha1sum
=
False
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment