Ask a questionAsk a question
 

Answeropen xml from document library for editing

  • Friday, November 06, 2009 8:54 PMEric M. Cox Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    To all,

    I have an XML document in a Document Library. When someone clicks on the XML file it launches the file in Internet Explorer.

    Is there any way to open this file in a text editor that is more friendly to viewing the XML in tree form. IE opens every tree control etc and does not allow editing.

    Is there any way to open the file in an XML text editor, or XML tree view friendly editor, and allow editing. If we can't edit can we at least give them a friendly XML tree view to browse the file?

    Thanks,
    Eric

Answers

  • Friday, November 06, 2009 9:51 PMCharlie Holland Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Eric,

    All you can do is use the 'Save a Copy' option from the context menu in Sharepoint to get a copy that can be edited in another tool, or use teh explorere view of your document library an drag the files onto your desktop.

    The problem is that IE automatically handles the xml mime type and the only way to prevent that (as far as I know) is via a registry hack on your client machines. Probably not a viable solution.

    I supose it depends on what you're hoping to do with the xml. One possibility would be to store the xml data in a column rather than as an attachment. That way you can edit it like any other text. I stuck a small project on CodePlex a few months ago that provides a basic implementation of an xml field together with a browser based editor, that may be of some use. Have a look at : http://spxml.codeplex.com/

    Hope this helps!




    Ch. - My Blog

All Replies

  • Friday, November 06, 2009 9:51 PMCharlie Holland Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Eric,

    All you can do is use the 'Save a Copy' option from the context menu in Sharepoint to get a copy that can be edited in another tool, or use teh explorere view of your document library an drag the files onto your desktop.

    The problem is that IE automatically handles the xml mime type and the only way to prevent that (as far as I know) is via a registry hack on your client machines. Probably not a viable solution.

    I supose it depends on what you're hoping to do with the xml. One possibility would be to store the xml data in a column rather than as an attachment. That way you can edit it like any other text. I stuck a small project on CodePlex a few months ago that provides a basic implementation of an xml field together with a browser based editor, that may be of some use. Have a look at : http://spxml.codeplex.com/

    Hope this helps!




    Ch. - My Blog