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
BedrockMission!

Learn More

View all

Sign in to view all badges

Working with ContentSpace in Workbench

Avatar

Avatar
Validate 1
Level 1
backroom_boy
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
backroom_boy
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
backroom_boy
Level 1

16-12-2010

The thing, i want to do ,is to obtain set of xml-files (or/and their

direct paths and names)  from some ContentsSpace folder.What am I doing

: I'm creating GetSpaceContents opeation and receive  list<CRCResult>

variable. The question is :1. how should I obtain (what functions ,

using xpath or smth. else) the file directly and its attributes (such as

path, name)?

2. Can we access to each of the CRCResult variable in the list (

mylist[1], for example)?It didn't work out in my case.If we can't , why?

How should we produce that?

Thanks in advance.

Replies

Avatar

Avatar
Boost 3
Level 2
Raghu_A
Level 2

Likes

3 likes

Total Posts

42 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
Raghu_A
Level 2

Likes

3 likes

Total Posts

42 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile
Raghu_A
Level 2

16-12-2010

Inline.

From a variable of type CRCResult one can use xpath to get the file directly, its attributes etc.

Access File Contents:-

/process_data/CRCResultVar/object/@document

Access File Attributes:-

/process_data/CRCResultVar/object/attributeMap

Yes we can do that using following xpath notation:-

/process_data/myList[1]

For more details please see the following snapshots of the sample process:-

1. getSpaceContents(): Method gets the contents from space and stores them as a List of CRCResult object. (e.g. outputList<CRCResult>)

Snapshot1.JPG

2. execute(): Operation performs following steps:-

  •                 2.1 Fetch first item from outputList and assign it to a CRCResult variable (i.e. crcObj1 in our case) /process_data/crcObj1 = /process_data/outputList[1]
  •                 2.2. Fetch file contents from the CRCResult Object and store it to a Adobe Document Object(fileContent in our case) /process_data/@fileContent= /process_data/crcObj1/object/@document

  •                 2.3 Fetch file attributes from the CRCResult Object and store it to a string Map Object(fileAttrMap in our case) /process_data/fileAttrMap = /process_data/crcObj1/object/attributeMap

Snapshot2.JPG

Hope that answers your question well.

Avatar

Avatar
Validate 1
Level 1
backroom_boy
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
backroom_boy
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
backroom_boy
Level 1

16-12-2010

Thx a lot. This is exactly , what i need.