How to pass complex variable type to callout script

Hi,

in my powershell script some variables have complex types (such as ‘XmlElementList’ with children ‘XmlElement‘, but can also be other types).

I am also calling external scripts from my PS scripts (e.g. some python file, that returns some calculations). But when I give the above variable as my argument, the listed complex content is not passed. Do i need to transform it before?

Probably the easiest method would be to write the output to a file and have the python script read the file. I would use a json file

Hard to answer this without seeing your code … but, have you tried passing the .OuterXML property to your Python script ? This would in theory pass the text based XML that you could parse with Python ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.