---
title: Reporting with XML data in IBM Cognos BI – Part II
description: How to create and use an XML Data Sources Framework Manager. Cognos BI blog by Envisn.
image: https://www.envisn.com/hs-fs/file-15298559-jpg/images/xmlpart2.jpg
---

[![envisn](https://www.envisn.com/hs-fs/file-15282154-gif/images/logo.gif?width=120&name=logo.gif "envisn")](https://www.envisn.com)

[![Request a Demo](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/70307/973f9256-ef61-4ab8-ab2d-a004a90a18be.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/70307/973f9256-ef61-4ab8-ab2d-a004a90a18be)

[![see our new video the magic of netvisn](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/70307/1845b46e-0995-41bd-9970-5523914e0cdd.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/70307/1845b46e-0995-41bd-9970-5523914e0cdd)

# Envisn's IBM Cognos Blog

## [Reporting with XML data in IBM Cognos BI – Part II](https://www.envisn.com/envisn-cognos-blog/bid/44202/Reporting-with-XML-data-in-IBM-Cognos-BI-Part-II)

Posted by [The Envisn Team](https://www.envisn.com/envisn-cognos-blog/author/the-envisn-team)

- [Tweet](https://twitter.com/share)

*by Eugene Marcotte [- Envisn, Inc.](https://www.envisn.com/products/netvisn/)*  
In Part I we covered the basics of XML data. Here we will continue to broaden this subject area.

***How do I create and use an XML Data Source in Framework Manager? ***

First create a new project in Framework Manager. Log in, create a language, and then when it asks you to pick a data source, click new. Pick a name, description and screen tip. Set the Type to “XML.” When asked for a connection string we enter the location of the XML document. The simplest case is just providing the path on your hard disk. On my test server I used an absolute path on the hard drive: C:\Documents and Settings\Administrator.ENVISN-OFC\Desktop\Xml data\data.xml

Remember, this file needs to be accessible by the server(s) that is running IBM Cognos so an absolute path like this generally doesn’t work well for large environments. When you test the connection there should be a connection string that looks something like: ;LOCAL;XML;C:\Documents and Settings\Administrator.ENVISN-OFC\Desktop\Xml data\data.xml

If all goes well, hit finish. Next, select the newly created data source and then select which tables and fields you want to use. Expand the datasources, tables and you should see our table with our fields listed.

Once the fields are imported into Framework Manager it is possible to do a test against the data to make sure it can read from the file correctly.

![framework manager screenshot](https://www.envisn.com/hs-fs/file-15298559-jpg/images/xmlpart2.jpg)

And that’s pretty much the whole process for importing your XML data. You can use Framework Manager to do fancy modeling, renaming, and joining between data sources as required. Then, once you’re finished modeling you can create and publish the package to Cognos Connection and use it in Report Studio just like any other model.

Keep in mind that this is not an SQL system and as such the data-processing capabilities of Cognos are drastically reduced. It cannot have the SQL server compute joins between data, filter, summarize columns or do any other fancy manipulation. It can only do local processing in Cognos which is notoriously slow. In addition, to model multiple XML documents or “tables” you have to create a data source for each – unless someone knows some tricks I don’t!

Even more frustrating perhaps is that your XML data probably doesn’t conform to the schema that Framework Manager requires. Fear not! This is one of the strengths of XML – it is easily manipulated.

***Simpler XML Access in IBM Cognos – Use SQL***

There is a middle ground to using XML in Cognos and that is to use your database server’s built-in XML support. SQL Server, DB2, and others all have varying degrees of support for embedding XML and as a result let you build Framework Manager.

IBM has an article about doing just this using DB2 pureXML on their developerworks site:

[http://www.ibm.com/developerworks/data/library/techarticle/dm-0811saracco/index.html ](http://www.ibm.com/developerworks/data/library/techarticle/dm-0811saracco/index.html)

The article lists three options for dealing with XML in an SQL server, basically:

1. Treat it as raw text
2. Convert it to tables
3. Let pureXML (or whatever your vendor happens to call their tool) deal with it

The nice thing about this is that it pushes all the XML management issues into one area, the database server, and leaves Framework Manager and IBM Cognos free to use their standard SQL querying mechanisms. This is extremely useful because it can exploit database server optimizations, keep your source XML documents in their original format, and reduce the number of factors involved when getting your data into IBM Cognos.

Keep in mind that there are dozens more options for hosting your XML data. Using some open source tools and other IBM products you can keep your XML documents in their original structure and run a transformation into the IBM Cognos schema. When using one of the XML via SQL solutions like pureXML, you are already performing something similar to this transformation, typically using some technology like XPath to map documents and their elements to views and columns.

 Topics: [Cognos Framework Manager](https://www.envisn.com/envisn-cognos-blog/topic/cognos-framework-manager)

*Your feedback is very important to us - we’d love to hear your comments!*

### Subscribe to Envisn's IBM Cognos Blog

### Posts by Category

- [Cognos Content Store (22)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-content-store)
- [Cognos BI Best Practices (21)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-bi-best-practices)
- [Cognos Analytics (19)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-analytics)
- [Cognos BI administration (19)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-bi-administration)
- [Cognos Security (18)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-security)
- [Cognos Tools (14)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-tools)
- [Cognos Audit Data (11)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-audit-data)
- [Cognos Reporting (9)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-reporting)
- [Cognos Auditing (8)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-auditing)
- [Cognos 10 (7)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-10)
- [Cognos Framework Manager (7)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-framework-manager)
- [Cognos Metadata (7)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-metadata)
- [BI Trends (6)](https://www.envisn.com/envisn-cognos-blog/topic/bi-trends)
- [IBM Information on Demand (6)](https://www.envisn.com/envisn-cognos-blog/topic/ibm-information-on-demand)
- [Cognos Audit Log (5)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-audit-log)
- [cognos impact analysis (4)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-impact-analysis)
- [Big Data (3)](https://www.envisn.com/envisn-cognos-blog/topic/big-data)
- [Cognos Data Sources (3)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-data-sources)
- [Cognos Documentation (3)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-documentation)
- [Cognos Scheduling (3)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-scheduling)
- [Product Information (3)](https://www.envisn.com/envisn-cognos-blog/topic/product-information)
- [cognos data lineage (3)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-data-lineage)
- [Archiving Cognos Content (2)](https://www.envisn.com/envisn-cognos-blog/topic/archiving-cognos-content)
- [Cognos FM Model (2)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-fm-model)
- [Cognos migration (2)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-migration)
- [Announcements (1)](https://www.envisn.com/envisn-cognos-blog/topic/announcements)
- [Cognos Change Management (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-change-management)
- [Cognos Data Provenance (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-data-provenance)
- [Cognos Hotfiles (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-hotfiles)
- [Cognos Powerplay (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-powerplay)
- [Cognos Triggers (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-triggers)
- [Consolidating Cognos Environments (1)](https://www.envisn.com/envisn-cognos-blog/topic/consolidating-cognos-environments)
- [Impromptu (1)](https://www.envisn.com/envisn-cognos-blog/topic/impromptu)
- [Merging Content Stores (1)](https://www.envisn.com/envisn-cognos-blog/topic/merging-content-stores)
- [Remote Cognos Management (1)](https://www.envisn.com/envisn-cognos-blog/topic/remote-cognos-management)
- [cognos deployments (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-deployments)
- [cognos fm model documentation (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-fm-model-documentation)
- [cognos workspace (1)](https://www.envisn.com/envisn-cognos-blog/topic/cognos-workspace)
- [netvisn (1)](https://www.envisn.com/envisn-cognos-blog/topic/netvisn)

[see all](https://www.envisn.com/envisn-cognos-blog/bid/44202/Reporting-with-XML-data-in-IBM-Cognos-BI-Part-II#)

### Posts by Popularity

[![free download expert guide to cognos audit data](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/70307/6933ba0f-4664-4d5d-9413-edf64d7b2644.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/70307/6933ba0f-4664-4d5d-9413-edf64d7b2644)

### [Cognos Tools from Envisn](https://www.envisn.com/envisn-products)

[NetVisn](https://www.envisn.com/netvisn)  
[AutoVisn](https://www.envisn.com/autovisn-cogos-scheduler)  
[UniVisn](https://www.envisn.com/univisn-cognos-performance-management)  
[DocuVisn](https://www.envisn.com/docuvisn-cognos-documentation)

### [Cognos Resources](https://www.envisn.com/resources)

[Envisn’s IBM Cognos Blog](https://www.envisn.com/envisn-cognos-blog)  
[Custom Query Library](https://www.envisn.com/custom-query-library)  
[Tutorial Videos](https://www.envisn.com/cognos-demo-videos)  
[Mastering Cognos Security](https://www.envisn.com/mastering-ibm-cognos-security)  
[Content Store Survival Guide](https://www.envisn.com/content-store-survival-guide)  
[Expert Guide to Cognos Audit Data](https://www.envisn.com/cognos-audit-data-expert-guide)

### [Contact Envisn](https://www.envisn.com/contact)

[Request a Demo](https://www.envisn.com/request-a-demo)  
[Support](https://www.envisn.com/support)

512-991-3999  
[info@envisn.com](mailto:info@envisn.com)

### Latest Cognos Posts

| [![youtube](https://www.envisn.com/hs-fs/hubfs/youtube.png?width=30&name=youtube.png)](https://www.youtube.com/user/envisn) | [![linkedin](https://www.envisn.com/hs-fs/hubfs/linkedin.png?width=30&name=linkedin.png)](https://www.linkedin.com/company/envisn-inc./) | [![twitter](https://www.envisn.com/hs-fs/hubfs/twitter.png?width=30&name=twitter.png)](https://twitter.com/Envisn) | [![facebook](https://www.envisn.com/hs-fs/hubfs/facebook.png?width=30&name=facebook.png)](https://www.facebook.com/envisn/) |
| --- | --- | --- | --- |

[![Real Time Analytics](https://static.getclicky.com/media/links/badge.gif)](http://clicky.com/101126274)

![Clicky](https://in.getclicky.com/101126274ns.gif)

3000 Polar Lane, Suite 901, Cedar Park, TX 78613 USA  
*Serving North America, Europe, and the UK with plans to expand to other areas in the near future. **[Privacy, Copyright & Liability](https://www.envisn.com/privacy-copyright-liability)*