Skip to main content
Solved

Syntax to extract children into attributes with XMLFragmenter

  • March 6, 2023
  • 2 replies
  • 48 views

aaron
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 73 replies

I am using an HTTPCaller to return some XML which I then want to turn into attributes. I can extract the Project fragment below using the XMLFragmenter (with Projects/Project in the Elements to Match parameter) but I haven't figured out how to directly extract the children into fragments or directly into attributes. Using Projects/Project/* doesn't work. For instance, I want to extract ProjectNumber and Status more directly into attributes. So far my solution has been to use a StringSearcher and SubstringExtractor to get each attribute. That's a tedious way to do it. Any advice on a better way?

 

<?xml version="1.0" encoding="UTF-16"?><Project ProjectId="508DKDS6B2KA" ProgramId="YAK0C5V4UNVH" ProjectNumber="EST-00001" Status="Cancelled/Archived" StatusTimestamp="2021-04-01T12:23:55-06:00" LastChangeTimestamp="2021-06-29T14:15:01-06:00" ></Project>

 

Best answer by aaron

Try something like this:

imageResult:

image

Thanks @david_r​ , worked perfectly.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 8391 replies
  • March 7, 2023

Try something like this:

imageResult:

image


aaron
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 73 replies
  • Best Answer
  • March 7, 2023

Try something like this:

imageResult:

image

Thanks @david_r​ , worked perfectly.