Jython Code to Capture UCM cloud response
Content
Any file uploaded to UCM cloud gives a response that contains the same tag for all the elements with different Attribute values.
Here is a small Jython snippet that could be used for fetching the content id and placing that into a Test file.
This can be res used for any integrations that have middle ware usage like ODI, ICS, Mulesoft.
Code Snippet
import os;
import datetime;
import time;
from xml.dom import minidom
doc = minidom.parse('C:/Oracle'+'/'+'UCM Response.xml')
name = doc.getElementsByTagName('ns2:Field')
file = open('C:/Oracle'+'/'+'dDocName.txt',"w+")
for s in name :
if s.attributes['name'].value == 'dDocName':
file.write ('%s' % (s.firstChild.nodeValue))
file.close() 0