Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to Initialize a Document from Xml

jb1809
Level 3
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
Not applicable
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