Expand my Community achievements bar.

How to Initialize a Document from Xml

Avatar

Level 3
Hello,

I would like to initialize from XPATH a document variable (say xtmpdoc) from the content of an xml string. The xml document(string) looks something like this:

//datax is the xml variable



doc1


doc
...........






I tried

setDocAttribute(/process_data/@xtmpdoc, 'binaryData', /process_data/datax/data/item[1])/value/binaryData)

I got classCastException


Caused by: java.lang.ClassCastException: com.adobe.workflow.datatype.runtime.impl.document.DocumentHolder cannot be cast to org.w3c.dom.Node
at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:629)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:261)

Thanks,
Jesse
1 Reply

Avatar

Former Community Member
try using setValue operation,and assign the xmlVariable to a variable of type document

document type should be on the left hand side of the equation

let me know if this works

mergeandfuse@gmail.com