Hi All,

I am a newbie in python.
I have a SoapUI XML which looks something like this

<soapui>
<testSuite name=>
<testCase>
<testStep>
<config resourcePath ="testpath"></config>
</testStep>
</testCase>
</testSuite>
</soapui>

Now from python, I have to first validate that resourcePath is equal to "testpath". If yes change it's value to something else. I have used xml.dom.minidom. But somehow my code is not changing the value of the resourcePath. Please tell me how to do this from python.

Thanks and Regards,
Priyesh

Did you check my link to Java programmers? It warned that in many cases it is best to keep hands out of XML in Python, if it is not for interoperativity.

You can use my between code snippet if you do not want to check the validity of the files syntax but only want value

between('resourcePath=','<config>',myfile.read())
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.