# Unable to Extract the fields from the XML String

**URL:** <https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949>\
**Category:** CloverDX Platform\
**Created:** [March 26, 2018, 12:00am UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949 "2018-03-26T00:00:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![girish\_526](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@girish\_526](https://forum.cloverdx.com/u/girish_526)\
**Post date:** [March 26, 2018, 12:00am UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/1 "2018-03-26T00:00:00Z")

</div>

Hi Team,

Please help me in extracting the XML fields from the below payload.

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [March 26, 2018, 6:22pm UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/2 "2018-03-26T18:22:07Z")

</div>

Hello Girish,

Could you please elaborate more on what exactly you are trying to accomplish? Based on the payload sent you are using the XMLExtract to process information from a Salesforce SOAP API, and everything looks in order. Are you getting an error of sorts when extracting the data? Also is there a reason why you are not using the WebServiceClient component or do you have the file download beforehand?

---

<div class="post-metadata">

**Author:** ![girish\_526](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@girish\_526](https://forum.cloverdx.com/u/girish_526)\
**Post date:** [March 27, 2018, 4:30am UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/3 "2018-03-27T04:30:43Z")

</div>

Hi Pedro Vazquez Rosario,

I had the XML file in hand. I want to extract the fields like firstname,lastname,email etc.

Thanks,  
Girish.

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [March 27, 2018, 1:15pm UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/4 "2018-03-27T13:15:09Z")

</div>

Like I mentioned prior you can use the XMLExtract to extract the fields you mentioned. You can follow the same steps as described in the following forum post:

[https://forum.cloveretl.com/viewtopic.php?f=5&t=7541&p=13089#p13095](https://forum.cloveretl.com/viewtopic.php?f=5&t=7541&p=13089#p13095)

---

<div class="post-metadata">

**Author:** ![girish\_526](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@girish\_526](https://forum.cloverdx.com/u/girish_526)\
**Post date:** [March 28, 2018, 8:53am UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/5 "2018-03-28T08:53:00Z")

</div>

Hi,

I still unable to get all the fields. Please help.

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [March 28, 2018, 12:58pm UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/6 "2018-03-28T12:58:51Z")

</div>

Hi,

It would be helpful if you could please post the structure of the XML you are trying to extract, without any sensitive data of course.

Thank You,

---

<div class="post-metadata">

**Author:** ![girish\_526](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@girish\_526](https://forum.cloverdx.com/u/girish_526)\
**Post date:** [March 28, 2018, 3:29pm UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/7 "2018-03-28T15:29:03Z")

</div>

Please find the XML

\<ws:Worker\_Sync xmlns:ws=“urn:com.workday/workersync” xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”\>  
ws:Header  
ws:Version25.0\</ws:Version\>  
ws:Prior\_Entry\_Time2018-02-28T12:25:34.000-08:00\</ws:Prior\_Entry\_Time\>  
ws:Current\_Entry\_Time2018-03-01T13:27:19.841-08:00\</ws:Current\_Entry\_Time\>  
ws:Prior\_Effective\_Time2018-02-28T00:00:00.000-08:00\</ws:Prior\_Effective\_Time\>  
ws:Current\_Effective\_Time2018-03-01T00:00:00.000-08:00\</ws:Current\_Effective\_Time\>  
ws:Full\_Filefalse\</ws:Full\_File\>  
ws:Document\_Retention\_Policy30\</ws:Document\_Retention\_Policy\>  
ws:Worker\_Count1\</ws:Worker\_Count\>  
\</ws:Header\>  
ws:Worker  
ws:Summary  
ws:Employee\_ID800810\</ws:Employee\_ID\>  
ws:NameGaryy Song\</ws:Name\>  
\</ws:Summary\>  
ws:Eligibilitytrue\</ws:Eligibility\>  
ws:Personal  
ws:Name\_Data  
\<ws:First\_Name ws:PriorValue=“Gary”\>Garyy\</ws:First\_Name\>  
ws:Last\_NameSong\</ws:Last\_Name\>  
\</ws:Name\_Data\>  
ws:Email\_Data  
ws:Email\_TypeWORK\</ws:Email\_Type\>  
ws:Email\_Is\_Publictrue\</ws:Email\_Is\_Public\>  
ws:Is\_Primarytrue\</ws:Is\_Primary\>  
ws:Email\_Address[gary.song@instacart.com](mailto:gary.song@instacart.com)\</ws:Email\_Address\>  
\</ws:Email\_Data\>  
\</ws:Personal\>  
ws:Status  
ws:Activetrue\</ws:Active\>  
ws:Hire\_Date2018-02-05\</ws:Hire\_Date\>  
ws:Original\_Hire\_Date2018-02-05\</ws:Original\_Hire\_Date\>  
ws:Terminatedfalse\</ws:Terminated\>  
ws:Rehirefalse\</ws:Rehire\>  
\</ws:Status\>  
ws:Position  
ws:OperationNONE\</ws:Operation\>  
ws:Effective\_Date2018-02-05\</ws:Effective\_Date\>  
ws:Worker\_TypeRegular\</ws:Worker\_Type\>  
ws:Position\_Time\_TypeFull time\</ws:Position\_Time\_Type\>  
ws:Organization\_Data  
ws:OperationNONE\</ws:Operation\>  
ws:OrganizationINSTA-US-01\</ws:Organization\>  
ws:Organization\_TypeCompany\</ws:Organization\_Type\>  
\</ws:Organization\_Data\>  
ws:Organization\_Data  
ws:OperationNONE\</ws:Operation\>  
ws:Organization6800\</ws:Organization\>  
ws:Organization\_TypeCost\_Center\</ws:Organization\_Type\>  
\</ws:Organization\_Data\>  
ws:Job\_ProfileEN02E\</ws:Job\_Profile\>  
ws:Management\_Level5\</ws:Management\_Level\>  
ws:Supervisor  
ws:OperationNONE\</ws:Operation\>  
ws:Supervisor\_ID800009\</ws:Supervisor\_ID\>  
ws:Supervisor\_NameBrandon Leonardo\</ws:Supervisor\_Name\>  
\</ws:Supervisor\>  
\</ws:Position\>  
ws:Additional\_Information  
ws:Management\_Level\_TextIndividual Contributor\</ws:Management\_Level\_Text\>  
ws:Job\_Profile\_TextSoftware Engineer\</ws:Job\_Profile\_Text\>  
ws:LocationSan Francisco\</ws:Location\>  
ws:Company\_TextMaplebear dba Instacart\</ws:Company\_Text\>  
ws:Cost\_Center\_TextEngineering\</ws:Cost\_Center\_Text\>  
\</ws:Additional\_Information\>  
\</ws:Worker\>  
\</ws:Worker\_Sync\>

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [March 28, 2018, 4:25pm UTC](https://forum.cloverdx.com/t/unable-to-extract-the-fields-from-the-xml-string/1949/8 "2018-03-28T16:25:28Z")

</div>

Hi,

It appears that you still had some difficulties with the mapping, in cases like this its important to use the Populate parent record. A good tip is using the root element of the data you need to extract for example in your case it would be Worker and then use Populate parent record for all the other element mappings.

I have attached the solution to the XML you sent me

[Example.zip](https://cdn.cloverdx.com/forum/18200%5F5d736e9001aed7842c7b3a2f12f57de6/Example.zip)

- [Example.zip](https://cdn.cloverdx.com/forum/18200%5F5d736e9001aed7842c7b3a2f12f57de6/Example.zip)
