Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Mapping from hierarchical data text file to XML — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Mapping from hierarchical data text file to XML

Accepted answer
14
Views
4
Comments
edited Dec 1, 2019 5:06PM in Integration 4 comments

Content

Hello, community.
 
I've just got this really hard integration task. I have a text with the following content:
 
1,0042
2,1,Pen,10
3,4,across the street
3,6,across the bridge
2,2,Eraser,6
3,6,across the street
 
The first character of each line means the line's type: 1 stands for "purchasing order header", 2 stands for "purchasing order line" (items that I must deliver) and 3 stands for "purchasing order line locations" (where to deliver).
 
Putting it in a better view for hierarchical comprehension:
 
1,0042
   └2,1,Pen,10
      └3,4,across the street (from the top to here will become first line in the temporary stage file mentioned at the end of this post)
      └3,6,across the bridge (from the top to here will become second line in the temporary stage file mentioned at the end of this post)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!