Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
ciksemel
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
ciksemel
Commits
ff1a71dd
Kaydet (Commit)
ff1a71dd
authored
Ara 04, 2016
tarafından
Suleyman Poyraz
Kaydeden (comit)
GitHub
Ara 04, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update README.md
üst
008e79cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
189 additions
and
1 deletion
+189
-1
README.md
README.md
+189
-1
No files found.
README.md
Dosyayı görüntüle @
ff1a71dd
# iksemel
Mine XML Parser for my personal project.
This project forked from Pardus-Linux githbu repo but orginal iksemel write for using with python2. I rewrite pyiks.c for using iksemel in python3.
This project forked from Pardus-Linux github repo but orginal iksemel write for using with python2. I rewrite pyiks.c for using iksemel in python3.
Install:
--------
You dont need anything other than an installed Python framework.
iksemel-lite source is included and compiled built-in to the module.
To compile and install:
# ./setup.py install
then you can import the piksemel module in your python programs.
Documentation:
--------------
===> Module Constants:
*
TAG
*
ATTRIBUTE
*
DATA
These enumeration constants are used to report the type of the Node objects.
===> Module Exceptions
*
ParseError
Raised when given string or file contains invalid XML.
*
NotTag
Raised when a function accepting a tag node got another type of object.
*
NotData
Raised when a function accepting a data node got another type of object.
===> Module Functions:
*
parse(filename)
Parses the given XML file, and returns the top level tag's node object.
*
parseString(string)
Parses the given XML string and returns the top level tag's node object.
*
newDocument(tagname)
Creates a new top level tag node object with given tag name.
===> Module Objects:
*
Node
This object represents a node of the XML document tree. If you iterate
over a node object, you'll get the list of its child nodes.
===> Node Object Methods:
*
type()
Returns the type of the node.
*
data()
Returns character data for data nodes.
*
name()
Returns the name of the tag for tag nodes.
*
attributes()
Returns a list of node's attribute names. Returns an empty list
if there aren't any.
*
getAttribute(attributename)
Returns the value of the given attribute for tag nodes. If such
an attribute doesn't exists, returns None.
*
setAttribute(attributename, value)
Sets the given attribute's value for tag nodes. You can give
the value None for deleting an attribute.
*
getTag(tagname)
Returns the first tag node child with the given name. If such a child
doesn't exists, returns None.
*
getTagData(tagname)
Returns the contained character data from first tag node child with the
given name.
*
tags(tagname=None)
Iterates over child tag nodes. If optional tagname is given, only
iterates over tags with the given name.
*
firstChild()
Returns the first child node.
*
parent()
Returns the parent node.
*
root()
Returns the top level node.
*
next()
Returns the next node. If this is the last sibling, returns None.
*
nextTag(tagname=None)
Returns the next tag node. If optional tagname is given, returns the
next sibling tag node with the given name. Returns None if this is
the last such sibling.
*
previous()
Returns the previous node. If this is the first sibling, returns None.
*
previousTag(tagname=None)
Returns the previous tag node. If optional tagname is given, returns
the previous sibling tag node with the given name. Returns None if
this is the first such sibling.
*
insertTag(tagname)
Inserts a new child tag node with given name to the child nodes.
Returns the newly created tag node object.
*
insertData(data)
Inserts given character data to the child nodes. Returns the newly
created data node object.
*
setData(data)
Deletes given tag's current child nodes, then inserts the data as
its child.
*
insertNode(node)
Inserts given node tree to the child nodes. Returns the newly created
node object.
*
appendTag(tagname)
Create a tag node with given name and append it as the next sibling.
Returns the newly created tag node object.
*
appendData(data)
Appends given character data as the next sibling. Returns the newly
created data node object.
*
prependTag(tagname)
Create a tag node with given name and append it as the previous
sibling. Returns the newly created tag node object.
*
prependData(data)
Prepends given character data as the previous sibling. Returns the
newly created data node object.
*
hide()
Deletes the node from document tree.
*
toString()
Returns the XML string representation of node tree.
*
toPrettyString()
Returns the XML string representation of node tree. Line feeds and
tabs are inserted into the document to make it look pretty.
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