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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Get value using xpath


Not applicable

I'm prepopulating my form with xml. I need to access some elements in this xml (get the value of) using javascript and xpath.

Anybody know how that can be done, please?

Kind regars

6 Replies


Level 4
Hi Lars,

Would you like to get the field values within your process? If so, it depends on your process variable type:

-If it xfaform, you can directly use xpath (you should know the xml schema if you did not embedded in the form)

-If it is a DocumentForm then you can extract its data into XML using Form Data Integration services. From the XML data you can still get the values using XPATH



Not applicable
Hi Oguz,

Thanks for your reply. What I need to do is make the xpath calls in Designer on my dataconnection, rather than in Workbench.

In the LiveCycle Designer I have attached an xsd as datasource. I would like to implement some logic in this form using xpath and javascript. For example make an xpath that counts the number of a given element or extract values from the incoming xml.




Level 10
You do not need xpath have access to the data dom that is loaded in the form. To access it use This will give you access to the root node. You can path through al nodes to get to the one you want from there. I like to see the structure I am working with so I create a multiline field on the form and use this command to see the DOM Fieldname.rawValue ="pretty");

This will dump the DOM into that field so you can visually see it. Then you can simply path your way to the node that you want.

If you want the value of a node use the value command and not rawValue. There is also a nodes command that will return multiple nodes as well. Play with it and see if it does what you want.


Not applicable
Thanks Paul,

I tried creating the multiline field to see the DOM - worked great 🙂

In regards to the path to nodes, I do this right from Like for example: "" (If I wanted the value under Applicant)

Thanks again


Level 10
yes .....notice that it will follow the heirarchy of the form or the schema if there is one present.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now