Hi there
I have following XML document that i want to read in python code. i know how to read, thing is i want to make hash/list from this XML document.

<?xml version="1.0" ?>
‐ <fxall category="buyer" version="2.0">
‐ <tradeStatus>
‐ <tradeFinancials>
<userDefinedFields Name="UDF_6">six</userDefinedFields>
<userDefinedFields Name="UDF_7">seven</userDefinedFields>
<remarks>test remark</remarks>

‐ <fxall category="buyer" version="2.0">
‐ <tradeHeader>
<traderId>null Maker Name</traderId>
‐ <tradeStatus>
‐ <tradeFinancials>
<userDefinedFields Name="UDF_9">nine</userDefinedFields>
<userDefinedFields Name="UDF_10">ten</userDefinedFields>
<userDefinedFields Name="UDF_11">eleven</userDefinedFields>
<remarks>test remark2</remarks>

-----------------------------END OF XML FILE-----------------------------
How i can make a list/hash for furthur using in code? that i can access keys and values in furthur code.
I want to have result like this

Field [sourceId : test_sourceId1 , pmsId : 4521363.0.0,fundId:ACCT1@TESTCUST, and so on..............]

I dont want to use getElementsByTagName.And i am using xml.dom import minidom already.

Edited by Dani: Formatting fixed

8 Years
Discussion Span
Last Post by ultimatebuster
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.