 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Junior/RO Guest
|
Posted: Sun Jan 15, 2006 10:17 am Post subject: Help translating Python code to Delphi |
|
|
Hi, I need help to translate this Python code to Delphi (to read a xml file), but don't know which classes/libraries to use:
import xml.dom.minidom
dom = xml.dom.minidom.parseString(s)
file = dom.getElementsByTagName("file")[0]
fname = file.getAttribute("name")
createinfo = dom.getElementsByTagName("created_as")[0]
created_as = createinfo.getAttribute("original_name")
creator = createinfo.getElementsByTagName("patch")[0]
creator_hash = creator.getAttribute("hash")
mod = dom.getElementsByTagName("modified")[0]
lastpatch = mod.getElementsByTagName("patch")[0]
lastchange_hash = lastpatch.getAttribute("hash")
lastchange_author = lastpatch.getAttribute("author")
--
Junior/RO
|
|
| Back to top |
|
 |
Junior/RO Guest
|
Posted: Sun Jan 15, 2006 2:41 pm Post subject: Re: Help translating Python code to Delphi |
|
|
Junior/RO escreveu:
| Quote: | Hi, I need help to translate this Python code to Delphi (to read a xml file), but don't know which classes/libraries to use:
|
additional info:
identifiers fname, created_as, creator_hash, lastchange_hash, lastchange_author are strings
the others idents I don't know which is the appropriate type
sorry by the bad english and thanks in advance )
--
Não tá morto quem luta e quem peleia.
Junior/RO
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|