Hello,
I try to test imdbpy and have difficulties whith Extrator.

I would like to make a extrator to parse a simple xml file:

<employes>
    <employe num="1">
        <nom>Dupont</nom>
        <prenom>Robert</prenom>
        <sexe>M</sexe>
        <service>ressources humaines</service>
        <tel>0645</tel>
        <!--poste interne-->
        <date_arrivée>03-04-2004</date_arrivée>
        <!--arrivée dans la société-->
    </employe>

with this extrator:
class EmployerParser(DOMParserBase):
    """
    """
    _defGetRefs = True
    extractors = [Extractor(label='employer',
                    path="//employer",
                    attrs=Attribute(
                        key="nom",
                        path="./nom/text()"
                        ))]


Parsing is ok (no exception)
        parser = EmployerParser()
        data = parser.parse(uString)
but i have nothing in the dico data

thanks for your help
Sebastien
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to