Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

using the API SDK to load XML into a DOM (Custom QPAC)

Avatar

Former Community Member
Hia,



I just writing a Custom QPAC that will take a serialized stream of XML as an input field. What I then want to do in a Custom QPAC is load this data into a DOM. Can someone point me at the correct API calls I need to do this.



So the input value would be serialize(/process_data/formdata/form-data/data/xdp/datasets/data/*, false)



I read the from the QPAC panel by doing the standard call



String _xmlsource = (TextUtil.isEmpty(DOMUtil.getTextForChild(_rootInput, "xmlsource")))?"":DOMUtil.getTextForChild(_rootInput, "xmlsource");



What I then tried doing is calling



Node n = (Node) aExecCtx.getProcessDataValue(_xmlsource);



This fails as it returns a String of serialize(/process_data/formdata/form-data/data/xdp/datasets/data/*, false) and not the expected result of this command.



If I add a SetValue QPAC before and set a process variable for example mystring and set this to the serialize. And set my QPAC to look at that it seems to work, what I want to do is remove the need for the SetValue QPAC.



Any Help on this would be really appreciated.
1 Reply