Sample Robotic Automation solution: xmlDocumentComponent with schema
This sample solution shows how to use the xmlDocumentComponent component with an external schema in Pega Robot Studio.
Project items
- Windows form: Windows form1
- Automation: LoadDocument
- Automation: UpdatePublishers
- Automation: ValidateSchema
Automation details
LoadDocument
This automation contains the logic to be performed when various buttons on the form are clicked:
- When you click the txtFileName text box and and displays the contents in the txtXML text box. button, the automation opens the XML file specified in the
- When you click the txtSelectedXML text box. button, the automation displays the child nodes, InnexText, and other details depending on the XPath specified in the
UpdatePublishers
This automation contains the following group boxes: Append Publishers, Prepend Publishers, and Insert Publishers.
- In the Append Publishers group box, when you click the Publisher Operations tab, the automation appends the Publisher Info at the end of the XML file. button from the
- In the Prepend Publishers group box, when you click the Publisher Operations tab, the automation prepends the Publisher Info at the start of the XML file. button from the
- In the Insert Publishers group box, when you click the Publisher Operations tab, the automation inserts the Publisher Info at the index location mentioned in the txtPublisherIndex text box. button from the
ValidateSchema
When you click the Using the xmlDocumentComponent with schema.
button, the XML document is validated with reference to the XSD document that is used. The validation errors are displayed if any are found. For more information and instructions on how to build the automation, seeYou can download completed solutions for each version by using the links in the following table:
Studio version | Built by using this build | Sample solution download |
---|---|---|
8.0 | 8.0.1037 | xmlDocumentComponent with schema 8.0 |
8.0.SP1 | 8.0.2037 | xmlDocumentComponent with schema 8.0 SP1 |
19.1 | 19.1.2.0 | xmlDocumentComponent with schema 19.1 |
Previous topic Sample Robotic Automation solution: xmlDocumentComponent Next topic Robotic Automation example: An integration that uses VB.NET