Table of Contents

Search

  1. Preface
  2. Introduction to Data Validation Option
  3. Repositories
  4. XML Data Source
  5. Tests for XML Data Sources
  6. Connections
  7. Expressions
  8. Table Pairs
  9. Tests for Table Pairs
  10. Single-Table Constraints
  11. Tests for Single-Table Constraints
  12. Examples of Tests from Spreadsheets
  13. SQL Views
  14. Lookup Views
  15. Join Views
  16. Aggregate Views
  17. Business Intelligence and Reporting Tools Reports
  18. Dashboards
  19. DVOCmd Command Line Program
  20. Troubleshooting
  21. Appendix A: Datatype Reference
  22. Appendix B: Reporting Views
  23. Appendix C: Metadata Import Syntax
  24. Appendix D: Jasper Reports
  25. Appendix E: Glossary

Data Validation Option User Guide

Data Validation Option User Guide

XML Data Conversion to a Relational Structure

XML Data Conversion to a Relational Structure

You can create a join view based on the XML file to converts the hierarchical XML data to a relational structure. You can then use the join view as a table in a single-table constraint or table pair.
To create the join view, you create a self join based on the XML file. You can manually create or automatically generate a join view based on an XML file.
When you create the join view, you can specify which XML groups to include in the join view. An error occurs if you include multiple XML groups that are not connected.
For example, you have the following XML file:
<Root> <Customers> <Customer CustomerID="GLFM"> <CompanyName>Great Lakes Food Market</CompanyName> <ContactName>Howard Snyder</ContactName> <ContactTitle>Marketing Manager</ContactTitle> <Phone>(503) 555-7555</Phone> <FullAddress> <Address>32 Baker Blvd.</Address> <City>Eugene</City> <Region>OR</Region> <PostalCode>97403</PostalCode> <Country>USA</Country> </FullAddress> </Customer> <Customer CustomerID="HCIS"> <CompanyName>Hungry Coyote Import Store</CompanyName> <ContactName>Yoshi Latimer</ContactName> <ContactTitle>Sales Representative</ContactTitle> <Phone>(503) 555-6874</Phone> <Fax>(503) 555-2376</Fax> <FullAddress> <Address>165 Main St.</Address> <City>Elgin</City> <Region>OR</Region> <PostalCode>97827</PostalCode> <Country>USA</Country> </FullAddress> </Customer> <Customer CustomerID="LCCS"> <CompanyName>Little Cap Country Store</CompanyName> <ContactName>Martha Lamponelli</ContactName> <ContactTitle>Marketing Manager</ContactTitle> <Phone>(509) 555-7969</Phone> <Fax>(509) 555-6221</Fax> <FullAddress> <Address>412 Orchestra Terrace</Address> <City>Walla Walla</City> <Region>WA</Region> <PostalCode>99362</PostalCode> <Country>USA</Country> </FullAddress> </Customer> </Customers> </Root>
The XML file has the following XML groups and hierarchy: Root > Customers > Customer > Full Address.
An error appears when you automatically generate a join view and include the Customers XML group and the Full Address XML group, but exclude the Customer XML group. The Customer XML group is the link between the Customers XML group and Full Address XML group.