Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I exported the XML file of the metadata of a GIS database. I want to view this data on SharePoint 2010. I don't want to see the code, I want to actually see the way it looks in ArcCatalog. How can I do this? Thanks in advance!

share|improve this question
    
We ended up creating a Silverlight app to view our map data. –  Eugene Rosenfeld Apr 8 '11 at 19:44
add comment

2 Answers

Here is an entire custom webpart I wrote earlier today. It reads an xml that store information about our download section, the xml looks something like this.

<?xml version="1.0" encoding="utf-8"?>
<body>
    <file>
        <date>2010-12-01</date>
        <publish>True</publish>
        <publish_up>2010-12-01</publish_up>
        <publish_down/>
        <user>Eric</user>
        <name>Camelot Joomla Tools</name>
        <version>1.0 RC1</version>
        <folder>files\camelot_joomla_tools\</folder>
        <filename>(Unpack_me_first!)_Camelot_Joomla_Tools_1.0_RC1.zip</filename>
        <info><![CDATA[
        <p>Bendsoft Camelot Joomla Tools is a versatile Joomla component which gives 
        you the possibility to use and display SharePoint list content in Joomla!. The 
        SharePoint content can be displayed with different templates as lists or articles.</p>
        <p>Bendsoft currently offer two free open source SharePoint web parts to transfer 
        data from SharePoint to Joomla.</p>]]></info>
        <downloads>230</downloads>
        <hash>80a369e58f5cee98d3238d507ad31bfa</hash>
    </file>
    <file>
        <date>2011-04-02</date>
        <publish>True</publish>
        <publish_up>2011-04-12</publish_up>
        <publish_down/>
        <user>Eric</user>
        <name>Camelot.SharepointIntegration.dll</name>
        <version>1.0.1</version>
        <folder>files\library\</folder>
        <filename>Camelot.SharepointIntegration.dll_1.0.1.zip</filename>
        <info><![CDATA[
        <p>The Camelot Sharepoint Integration is a library containing necessary tools when creating Camelot XML based exports or imports.</p>]]></info>
        <downloads>3</downloads>
        <hash>ccbd580be5149e8ac78364c1c3133982</hash>
    </file>
</body>

And the webpart code

using System.Collections.Generic;
using System.Linq;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace BendsoftDownloadStats
{
    public class BendsoftDownloadStats : System.Web.UI.WebControls.WebParts.WebPart
    {
        private string RSSFile = @"C:\windows\temp\downloads.xml";

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            HtmlGenericControl mainDiv = new HtmlGenericControl("div");
            mainDiv.ID = "mainDiv";
            Controls.Add(mainDiv);

            var xmlSource = XElement.Load(RSSFile);

            IEnumerable<XElement> q =
                (from c in xmlSource.Elements("file")
                 where (string)c.Element("publish") == "True"
                 orderby c.Element("name").Value, c.Element("version").Value
                 select c).ToArray();

            foreach (XElement c in q)
            {
                string insert = string.Empty;

                insert += string.Concat(c.Element("name").Value, " (", c.Element("version").Value, ")");
                insert += string.Concat(" - <em>", c.Element("date").Value, "</em><br />");
                insert += string.Concat("<strong>", c.Element("downloads").Value, "</strong>");

                HtmlGenericControl paragraph = new HtmlGenericControl("p");
                paragraph.ID = c.Element("hash").Value;
                paragraph.InnerHtml = insert;
                mainDiv.Controls.Add(paragraph);
            }
        }
    }
}

Simple, very fast and adaptable!

share|improve this answer
add comment

The answer lies in a third party app/webpart or creating your own xslt file to render the XML the way you want. There is an XML web part that will let you point to an xml file, or enter xml manually, point to an xsl file, or enter it manually, and render the results.

You can also create a custom Data View Web Part to accomplish this.

share|improve this answer
    
Hi Serious SP, I to use the XML Viewer Web Part but it kept giving me an error msg stating "Failed to apply XSLT to the content". I'm using ArcCatalog's "ARCGIS2FGDC.xsl" file. Don't know what's wrong :( –  Pedro Apr 12 '11 at 21:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.