[Python] no such file or directory, dom parser

Discussão em 'Python' iniciado por Stack, Junho 10, 2025.

  1. Stack

    Stack Membro Participativo

    I am planning to using DOM parser to xml file. Stored xml file in azure storage location and using databricks I am using python dom parser code to access the file.

    from xml.dom.minidom import parse
    import xml.dom.minidom
    xmlpath = "abfss://xxxxx@fr96devledpstoragesa0005.dfs.core.windows.net/extractingestion/test/Notes.xml"
    dom = xml.dom.minidom.parse(xmlpath)


    But it throws me error as "No such file or directory "

    Could you please help. I am able access the file by using just regular spark syntax but not with dom parser syntax.

    xml_path = "abfss://xxxxx@fr96devledpstoragesa0005.dfs.core.windows.net/extractingestion/test/Notes.xml"
    df= spark. read. format ("xml") . option("rowTag", "note"). load(xml_path)
    df. show()


    [​IMG]

    Continue reading...

Compartilhe esta Página