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

Sample XML: data file in Preview tab


Not applicable


how to parse data file imported via Preview tab through Javascript?

I use a Sample XML data connection and import xml data via Preview tab. Though, I'd like to manually parse the data file. Is it anyway possible? Or the only chance is to play with hidden text fields...


5 Replies


Level 5


I didn't really understand what you trying to achieve. Can you run by that again?


Not applicable

I found a solution on my own! It's weird that these days many questions on the forum are left unanswered. Till a couple of years ago, there were many STAFF-people together with senior members taking care of us...

Anyway, following is what I did (though it may not be the best - in particular "resolveNode()" may deteriorate performance according to what I know).

First of all, I have a sample XML like this:






















I bind a field to this XML file. I import the same under File-->Form Properties...-->Preview-->Data File.

Now, this was the situation: the bound field (a drop-down box) displayed data as expected (let's say it was bonded to Element-->a) but I had another field left unbounded (a simple text field) on my form which I wanted to fill by script with Element--->b. Of course, I had to parse the XML file and get Element-->b1 if the drop-down had Element-->a1, Element-->b2 if the drop-down had  Element-->a2 and so on...

This is what I did:

var dropDown_rawValue = myDropDown.rawValue;

var i;

...iterate i...

var string = "$record.Element["+i+"]";

if (xfa.resolveNode(string).a.value == dropDown_rawValue){

     ...populate unbound field with corresponding Element[i]-->b...


If you got any better solutions, they are welcome!


Level 5

Can't think in another solution for that right now.

I'm curious, though, why would the resolveNode() deteriorate performance? I couldn't find any reference. Can you share with us?


Level 8

xfa.resolveNodes("[*]") would give you a handle to the data, don't really understand what you're trying to do


Not applicable


I am also a bit confused... I have reviewed this subject very quickly as I am not developing huge applications. However here is what I have got:
1) this one links to the following;
2) (here you'll find test results).

The following links to John Brinkman's work but it seems to downgrade resolveNode() as I said:


What do you think?

The ultimate experience is back.

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

Register Now