Question

I'd like to organize my XML data to be collapsable and expandable using a preprocessor command like the #region/#endregion command in C#/.NET. I'm editing this file Visual Studio 2008.

Does any such ability exist? I've googled to no avail. The closest I can come to so far is to expand and collapse the tags themselves, so I can collapse between

<Data> 
(this is collapsed)
</Data>
Was it helpful?

Solution

There does not appear to be any Visual Studio supported ability to do what I'm looking to do. As discussed in Oded's answer, the best solution was to add XML comments like

<!--START [enter description]--> 
<myDataHere .../>
<!--END [enter description]--> 

with Whitespace to organize the code.

OTHER TIPS

if you have VS 2010 + then the fantastic extension here is your best new friend. http://visualstudiogallery.msdn.microsoft.com/3c534623-bb05-417f-afc0-c9e26bf0e177/view/Reviews If not ;( upgrade?

Using such commands would change the XML file itself, so I can't see a real use case for this and as you said, you can collapse the tags themselves, so you already have a close to perfect solution to your problem. Why do you need more then that?

<!--region product colors-->
<color name="green_008060">#008060</color>
<color name="green_trans_40_percent_008060">#66008060</color>
<!--endregion product colors-->
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top