Question
8
Replies
423
Views
Infosys
Posted: March 16, 2018
Last activity: November 6, 2018
Closed
Solved
Robotics [RDA] - Creating an XML document by scraping a website
Hi all,
I am trying to scrape a website which has a list of address cards. After the scraping is done, I need to send the data over to PEGA where I can parse it and display on UI. I would like to have the data transfer format as XML. So, I have tried 2 options
- Append all those string using some delimiters and later call a C# script component to parse that and build XML
- Use XML Builder [something like XMLDocumentComponent] to do the same.
- This would eliminate custom coding in favor of standards but I could not figure how to build the XML.
- I have tried using a Schema Provider on the XML component so that a proper structure will be defined before I start using it
- Then, using Create.Type method, I tried creating a child node for each address (from ListLoop component)
- Finally, I have tried reading the OuterXML but got nothing
Even though point 1 worked for now, I would really want that custom code to be eliminated if point 2 works. Please suggest...
The simplest way to do this is to put all of your data into a Lookup Table. When you are done you can call the WriteXML method of the underlying DataTable to get a properly formatedd Xml document.