Skip to main content
Nintex Community Menu Bar
Solved

How to extract data from an XML file


I have a large xml file with various data i need to extract. Things such as ID Number, Account Number, Date, etc. I am only able to select the whole xml file to target instead of individual text strings. Is there a way I can get a text string save it to a variable and then go to the next data i need to extract?

Best answer by john_armstrong

Hi @fshah 


 


If upgrading is not an option, another thing to try might be to open the *.xml file in an editor like Notepad and using a 'Get Value' action to pull it into a Variable. This eliminates the need for the 'Read File' action that is not present in 12.3.1. After it is in the Variable, you can manipulate it as needed with Formulas.


 


Thanks,


John.

View original
Translate
Did this topic help you find an answer to your question?

12 replies

mbalslow
  • 32 replies
  • February 24, 2020

Hi @fshah,


How you exactly get the specific values of the file depends on the file structure. But basically, what I would do is to create the following actions in below order:



  1. Create Variable - found in the action list under "Data" (a text variable with a name like "FileText")

  2. Read File - found in the action list under "Files" (to read your file and store it in your "FileText" variable)

  3. Formula - found in the action list under "Data" (this action you can use now to grab your data using different text formulas)


I hope this makes sense. Let me know if you need additional assistance.

Translate

  • Author
  • 6 replies
  • February 24, 2020
Hey @mbalslow,
I do not have the 'Read File' action. I do not see it under the 'Files' action list either. I would screenshot it but the Files action list disappears when I'm not hovering over it
Translate

mbalslow
  • 32 replies
  • February 24, 2020

Hi @fshah,


Please make sure that you have set your account to "Expert" mode in order to be able to see all actions. I have attached two screenshots.

Translate

  • Author
  • 6 replies
  • February 24, 2020

Alright so my account was actually on beginner, however I just changed it to expert and still do not see that option. Also I did restart the client as well. @mbalslow


 


 

Translate

mbalslow
  • 32 replies
  • February 24, 2020

@fshah you have to click on "Files" to expand the section to be able to access the "Read File" action.

Translate

  • Author
  • 6 replies
  • February 24, 2020

Right. That action is not there


@mbalslow

Translate

mbalslow
  • 32 replies
  • February 24, 2020

@fshah what version are you running?


I'm not sure how it could be that you don't see that action. What other actions from my screenshot don't you see?


Translate

  • Author
  • 6 replies
  • February 24, 2020

@mbalslow I'm running 12.3.1, that could be the reason why. Also I attatched a screenshot of what my action list looks like on the previous comment

Along with Read File, i dont have:
Touch file
Write file
Set folder
Touch folder

Translate

Aaron_Bultman
Nintex Employee
  • Nintex Employee
  • 20 replies
  • February 24, 2020

Hi fshah,


 


You will need to upgrade to v15.1.4 to get those missing Actions.


 


Download link:  https://download.nintex.com/Foxtrot/FoxtrotRPASetup_15_1_4.exe


 


You will need to upgrade all machines with v12.3.1 installed, starting with the one that houses your licensing.  If you'd like assistance, feel free to reach out to our support group:  support@nintex.com or 1-800-658-1147.


 


Enjoy the day,


Aaron

Translate

Forum|alt.badge.img+7
  • Nintex Employee
  • 34 replies
  • Answer
  • February 24, 2020

Hi @fshah 


 


If upgrading is not an option, another thing to try might be to open the *.xml file in an editor like Notepad and using a 'Get Value' action to pull it into a Variable. This eliminates the need for the 'Read File' action that is not present in 12.3.1. After it is in the Variable, you can manipulate it as needed with Formulas.


 


Thanks,


John.

Translate

mbalslow
  • 32 replies
  • February 24, 2020

Hi @fshah


Yeah okay, as Aaron also writes, the issue then is that you are running on quite an old version of Foxtrot, that is why you do not see my referenced actions.


And Johns suggestion is correct that you can use the "Get Value" action in case you are not able/allowed to upgrade, however, that is a fairly less effective way of doing it.

Translate

  • 2 replies
  • May 12, 2020

I almost have the same issue.


Using vbscript to write to a csv file, how can I get to the data that was imported from a csv file, so it can be written to the csv file?


I use the RPAEngine.GetVar to copy the value of a Foxtrot variable into a vbscript variable so I can use it but fails when trying to access the data directly


 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings