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)
1
Konular (issue)
1
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
79521f68
Kaydet (Commit)
79521f68
authored
May 01, 2006
tarafından
Gürer Özen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bugfix
üst
7f817b8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
xmlextpiks.py
pisi/pxml/xmlextpiks.py
+4
-11
No files found.
pisi/pxml/xmlextpiks.py
Dosyayı görüntüle @
79521f68
...
...
@@ -98,16 +98,6 @@ def getNode(node, tagpath):
node
=
currentNode
return
currentNode
def
addText
(
node
,
tagpath
,
text
):
if
tagpath
!=
""
:
tags
=
tagpath
.
split
(
"/"
)
for
tag
in
tags
:
if
node
.
getTag
(
tag
):
node
=
node
.
getTag
(
tag
)
else
:
node
=
node
.
insertTag
(
tag
)
node
.
insertData
(
text
)
def
createTagPath
(
node
,
tags
):
"""create new child at the end of a tag chain starting from node
no matter what"""
...
...
@@ -121,7 +111,7 @@ def addTagPath(node, tags, newnode=None):
"""add newnode at the end of a tag chain, smart one"""
node
=
createTagPath
(
node
,
tags
)
if
newnode
:
# node to add specified
node
.
appendChild
(
newnode
)
node
.
insertData
(
newnode
)
return
node
def
addNode
(
node
,
tagpath
,
newnode
=
None
,
branch
=
True
):
...
...
@@ -158,3 +148,6 @@ def addNode(node, tagpath, newnode = None, branch=True):
return
addTagPath
(
node
,
tags
,
newnode
)
return
node
def
addText
(
node
,
tagpath
,
text
):
addNode
(
node
,
tagpath
,
text
)
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