I have some configuration to be read once ,so I put these attributes in a xml file:
<items>
<item id="" name="">
<page src=""/>
<page src=""/>
<page src=""/>
</item>
<item id="" name="">
<page src=""/>
<page src=""/>
<page src=""/>
</item>
............
</items>
In java,I can read this file within the init method of a servlet using the jdom or dom4j.
THen put these attributes in a List or a Map.
But in asp.net,I have no idea how to implement this,any suggestion?
This is assuming you’re using c#. It basically reads the xml out using linq to xml into the classes defined. GetConfigItems will then return a List<> of the items. I haven’t tested this, but it’s along the right lines.