Capturing data from users and building XML dynamically in asp.net

Alegz

New Member
I have a big configuration XML which isrequired to be edited very frequently and at times needs to be generated from scratch on user inputs.Now a parent tag may have N number of child tags and i need to capture all of those and genearate the xml.For ex,\[code\]<Parent><Child>..</Child><Child>..</Child><Child>..</Child></Parent>\[/code\]This child tag again has N number to sub tags and again they are variable.How should i go about designing the UI first for capturing all this data and then how do i build the xml efficiently?Currently i am using Linq to XML for building xml and it seems to be a good solution, but the major problem seems to be getting that data from User in an efficient manner.Here's the sample xml which i need to generate:\[code\]<SESSIONANALYSER> <AP> <MODES> <NI> <STATEINFORMATION TYPE="PREPAID"> <INIT INVALIDINPUTRESPONSE="-2"> <INPUT VALUE="http://stackoverflow.com/questions/10574512/SLN7ACTIVATION"> <METHOD NAME="CHECKSUBSCRIBERBALANCE" PARAMETERS="SLN7" POSSIBLEACTIONS="FALLOUTON_FAILUREREGION_SETPSOFAILED_FALSE" MAINTAINSESSION="NO" RESPONSE="-4" NEXTLEVEL="" /> <METHOD NAME="SETPSOINUCIP" PARAMETERS="SLN7" POSSIBLEACTIONS="FALLOUTON_FAILUREREGION_SETPSOFAILED_FALSE" MAINTAINSESSION="NO" RESPONSE="-4" NEXTLEVEL="" /> <METHOD NAME="SENDMESSAGE" PARAMETERS="" POSSIBLEACTIONS="FALLOUTONSUCCESS" MAINTAINSESSION="NO" RESPONSE="0" NEXTLEVEL="" /> </INPUT> <INPUT VALUE="http://stackoverflow.com/questions/10574512/SLN7DEACTIVATION"> <METHOD NAME="UNSETPSOINUCIP" PARAMETERS="SLN7" POSSIBLEACTIONS="FALLOUTON_FAILUREREGION_SETPSOFAILED_FALSE" MAINTAINSESSION="NO" RESPONSE="-4" NEXTLEVEL="" /> </INPUT> </INIT> <FAILUREREGION INVALIDINPUTRESPONSE="-2"> <INPUT VALUE="http://stackoverflow.com/questions/10574512/LOWBALANCE"> <METHOD NAME="SENDMESSAGE" PARAMETERS="" POSSIBLEACTIONS="FALLOUTONSUCCESS" MAINTAINSESSION="NO" RESPONSE="1" NEXTLEVEL="" /> </INPUT> <INPUT VALUE="http://stackoverflow.com/questions/10574512/SETPSOFAILED"> <METHOD NAME="SENDMESSAGE" PARAMETERS="" POSSIBLEACTIONS="FALLOUTONSUCCESS" MAINTAINSESSION="NO" RESPONSE="2" NEXTLEVEL="" /> </INPUT> <INPUT VALUE="http://stackoverflow.com/questions/10574512/UNSETPSO"> <METHOD NAME="SENDMESSAGE" PARAMETERS="" POSSIBLEACTIONS="FALLOUTONSUCCESS" MAINTAINSESSION="NO" RESPONSE="4" NEXTLEVEL="" /> </INPUT> </FAILUREREGION> </STATEINFORMATION> <STATEINFORMATION TYPE="POSTPAID"> <INIT INVALIDINPUTRESPONSE="-2"> <INPUT VALUE="http://stackoverflow.com/questions/10574512/SLN7DEACTIVATION"> <METHOD NAME="SENDMESSAGE" PARAMETERS="" POSSIBLEACTIONS="FALLOUTONSUCCESS" MAINTAINSESSION="NO" RESPONSE="5" NEXTLEVEL="" /> </INPUT> </INIT> </STATEINFORMATION> </NI> </MODES> </AP></SESSIONANALYSER>\[/code\]
 
Back
Top