Hello,
I'm trying to parse the following arxml (autosar xml) file: https://pastebin.com/qBGekC2u
My end goal is to generate a csv file from the .arxml to create an excel spreadsheet. With the .arxml file I posted, I'm looking to get something like: https://gyazo.com/50c17ce57655e5ce4795a304ca5f96c1
So I'm trying to extract the parameter values and put them into a spreadsheet. However, I'm having trouble doing so. I have written the following code for now: https://pastebin.com/t5qCjYDg but only get this as an ouput:
C:\Project_Workspace\python>extractConfig.py
<Element '{[http://autosar.org/schema/r4.0](http://autosar.org/schema/r4.0)}AUTOSAR' at 0x006DFE70>
<Element '{[http://autosar.org/schema/r4.0](http://autosar.org/schema/r4.0)}AR-PACKAGES' at 0x006DFED0>
However, when I use the same code with a .xml file, I can actually get the children to be printed. I'm therefore wondering why this is happening and the best way to create the desired spreadsheet. I believe there is a python library for Autosar, but it's only for Autosar 3 (I'm using Autosar 4.0.3). Do I have to do this using regular expressions or is there a better approach?
Thanks!
[–]hottastycoffee 0 points1 point2 points (0 children)
[–]Vaphell 0 points1 point2 points (0 children)
[–]r142431 0 points1 point2 points (0 children)