Tan Rino

Tan Rino

  • NA
  • 21
  • 0

How to sort the XML data??(ascending order)please help..vb.net

Jan 29 2008 9:55 PM

hi,i'm newbie in programing. I face some problem with my current project.I'm using vb.net to write my program.

My problem is like that:

I wan to sort the specific element in xml file that will shot out ascending and descending about the record after clicking the sort command button.


FOR EXAMPLE: My XML file data is like below:

<RegistrationRecord>
<tblRegistration>
<company_name>ABC Sdn Bhd</company_name>
<admin_module>Process Manager</admin_module>
<web_module>Process Manager (Content Search)</web_module>
<date_created>27-Apr-2006</date_created>
<user_name>Admin</user_name>
</tblRegistration>
<tblRegistration>
<company_name>XYZ Sdn Bhd</company_name>
<admin_module>Basic</admin_module>
<web_module>Version Control (Content Search)</web_module>           
 <date_create>27-Jan-2007</date_created>
<user_name>Admin</user_name>
</tblRegistration>
<tblRegistration>

1)I have 1 drop down list that consists of <company name>,<admin_module> and <web_module>  3 element to sort.

2)I want sort the XML data based on specific child element as above. If i choose the admin_module on drop down list, then the result output is show that the record XYZ Sdn Bhd will list at the begin because the <admin_module>Basic</admin_module> is sort first.

--->how to make it be possible??
-->can show me the related sample or guide me with provide some useful source code??

-->Thanks.


Answers (15)