Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am converting a java project into python but dont really know much about pyhton This is what i am doing in java:

    document dom;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

    try { 
        DocumentBuilder db = dbf.newDocumentBuilder();
        dom = db.parse(xml);
        Element doc = dom.getDocumentElement();

        NodeList test_info = doc.getElementsByTagName("test_info");
        NodeList attributes = test_info.item(0).getChildNodes();
        BufferedWriter writer = null;
        writer = new BufferedWriter(new FileWriter(csv));

How to convert this to python?

share|improve this question

put on hold as too broad by DNA, Stefan Beike, EdChum, Kevin, Jesper 17 hours ago

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

2  
If you want to receive helpful answers (instead of more downvotes) you should provide the python code that you wrote so far. You should describe where you are exactly struggling. The idea of this site is to help with problems - not to do all the work for you and provide "ready-to-serve" code. –  EddyG 18 hours ago
    

Browse other questions tagged or ask your own question.