Libxml2 Python Manual

Mauricio Martinez Garcia morfeokmg at gmail.com
Tue Jan 24 22:57:37 EST 2012


Tanks Nicholas.

Yes, check the documentation effectively and yet it does not require C
programminginformation if not for python, the only site I found examples and
 libxml2 for python propertiesis as follows
http://mikekneller.com/kb/python/libxml2python / part1. And, apart from
there to build a client very simple WSDL in python, but I want to improve
the client and make it more dynamic, because now I have templates for responses
and submissions of information from the XML, so I have generated WSDL objects
for each service (sending / receiving / wrong response / OK response).
I need to generate a parser that does not depend that I know what I expect
and what tosend, if not, it is generic.

This is a example for my client:

    *def getXMLInfo(self, xmlParam):*
*        #pdb.set_trace()*
*        try:*
*            document = libxml2.parseDoc(xmlParam)*
*            return document*
*        except Exception as ex:*
*            print "Hubo un error en el parseo de la respuesta de ALU: ",ex*
*            loggingRegister.registrarLog("Hubo un error en el parseo de la
respuesta de ALU: "+str(ex))*

   * def getAllInformationResponse(self,parametro):*
*        pdb.set_trace()*
*        #===================================================*
*        #informacion general de la cuenta en el XML*
*        #Para el contenido de getAllInformationResponse*
*        #===================================================*
*        ReturncardNumber= None*
*        ReturncontractNumber=None*
*        ReturndefaultAccount=None*
*        ReturndefaultAccountIdentifierLogin=None*
*        ReturndefaultComOfferName=None*
*        ReturndefaultComOfferSubscription=None*
*        ReturnfriendAndFamilyList=None*
*        friendAndFamilyList=None*
*        ListaFnFs = {}*
*        ReturnfriendsAndFamilyListName=None*
*        Returnidentifier=None*
*        ReturnidentifierLogin=None*
*        Returnmsid=None*
*        Returnstatus=None*
*        #===================================================*
*
*
*        #===================================================*
*        #Variables para los elementos que contiene*
.....
      *
#==========================================================================*
*        #Se genera el objeto de slices para poder ingresar toda la
informacion*
*
#==========================================================================*
*        sliceGETALL = slicesALU(archivoDeLOGS)*
*
#==========================================================================*
*
*
*        root = parametro.getRootElement()*
*        loggingRegister.registrarLog('Generando arbol XML...')*
*        #print root.name*
*        #pdb.set_trace()*
*        Body = root.children*
*        child = Body.children*
*        if (child.name == 'getAllInformationResponse'):*
*            #print child.name*
*            child = child.children*
*            #print child.name*
*            responseALU = child.children*
*            while responseALU is not None:*
*                if responseALU.type == 'element':*
*                    #print responseALU.name*
*                    #pdb.set_trace()*
*                    if responseALU.name in
['cardNumber','contractNumber','defaultAccount','defaultAccountIdentifierLogin','defaultComOfferName','defaultComOfferSubscription','friendAndFamily
*
*
List','friendsAndFamilyListName','identifier','identifierLogin','msid','status']:
*

......

Greetings.


2012/1/24 Nick Dokos <nicholas.dokos at hp.com>

> Mauricio Martinez Garcia <morfeokmg at gmail.com> wrote:
>
> >   For libxml2, are there any manual. For this library?, i searched on
> > google and just find the following URL xmlsoft.org Wich can not find
> > any API manual.
> >
>
> Did you check under "Reference Manual" at http://xmlsoft.org? That's the
> second entry in the Main Menu.
>
> Nick
>
>


-- 

*Mauricio Martínez Garcia
*Soporte Aplicaciones / Soporte Operativo WDM

Subdirección de Operación y Producción
Dirección de Sistemas
Filiberto Gómez 40-42, Fracc. Industrial Tlane.
C.P. 54030 Tlanepantla, Edo. de México
Nextel (ID): 52*1*18033
Móvil: +52 55.3520.4672
Directo: 4115.3252, Fax: 1018.3815
e-mail: mauricio.martinez.garcia at hp.com
morfeokmg at gmail.com
 <mauricio.martinez at nextel.com.mx>

"Si encuentras un trébol de cuatro hojas..., hallaras la felicidad. Pero
¿Sabes?, seguramente no la encontrarás, porque la felicidad se encuentra en
silencio guardada en una jaula. EL trebol de Cuatro hojas nunca será de
nadie... ¿Que te parece si te adueñas de un trébol de tres hojas?..."
"我渴望得到幸福,  我渴望得到幸福, 和你一起得到幸福, 成为你的幸福, 带我离开, 带我远离这个地方, 笼中之鸟, 不能飞翔的鸟, 不会哭泣的鸟,
孤单的鸟, 因此请带我离开, 我渴望得到幸福, 只要在你身边我便感到幸福, 只要你微笑我便感到幸福, 初次的心愿成为了最后的愿望,
这里是妖精等待着的, 我们两人的约定地点,  因此请代我离开, 为了忘却现实, 为了停留在梦幻之中, 为了永远能够思念你, 带我离开,
我渴望得到幸福, 找到四叶"三叶草", 就能得到幸福   不过,   请保守秘密 三叶草的白花   在哪里开放? 它的叶有多少瓣?
四叶"三叶草"   我想令你得到幸福   可是我不能成为你的人"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120124/cd061781/attachment-0001.html>


More information about the Python-list mailing list