NJCapeAdmin
08-28-2009, 08:16 PM
I have been trying to figure this out for a week, searched Google many times
- read tons of articles - I just can't get this to work. I have an XML file
which is generated by an application we use. This XML file loads data into
a form for the application. the application was written poorly and does not
allow sorting of the columns on the form. This makes using the form very
difficult as I need to look through over 500 entries 3 at a time (all the
form will allow you to display). My goal is to be able to sort this XML
file so that when the form is opened the entries are sorted already,
making looking for a particular entry much easier. I cannot change the
way the app uses the XML so I need to sort the XML file and then place
it back into the App folder sorted. I tested this by manually sorting 2
entries in notepad and it does work, but sorting 500+ entries manually
is not feasible. Ok now here is an example of my XML file listed below:
<bunch of stuff before the section I need sorted>
<mailboxes>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username4</login>
<password>********</password>
<alternate_address>username4@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username2</login>
<password>********</password>
<alternate_address>username2@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username1</login>
<password>********</password>
<alternate_address>username1@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
</mailboxes>
<bunch of stuff at the end>
I wish to have this sorted by the ALTERNATE_ADDRESS portion of the data.
I have read so many posts and tried to adapt so many pieces of code to
fit my needs, but I just can't get this to work. I am a Network Engineer
who dabbles in code every now and then, but I am certainly not a programmer,
so please try to post in as simple terms as possible.
Thanks to anyone who may take the time to read this post, or that tries to
help me out - I really do appreciate the time & effort.
- read tons of articles - I just can't get this to work. I have an XML file
which is generated by an application we use. This XML file loads data into
a form for the application. the application was written poorly and does not
allow sorting of the columns on the form. This makes using the form very
difficult as I need to look through over 500 entries 3 at a time (all the
form will allow you to display). My goal is to be able to sort this XML
file so that when the form is opened the entries are sorted already,
making looking for a particular entry much easier. I cannot change the
way the app uses the XML so I need to sort the XML file and then place
it back into the App folder sorted. I tested this by manually sorting 2
entries in notepad and it does work, but sorting 500+ entries manually
is not feasible. Ok now here is an example of my XML file listed below:
<bunch of stuff before the section I need sorted>
<mailboxes>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username4</login>
<password>********</password>
<alternate_address>username4@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username2</login>
<password>********</password>
<alternate_address>username2@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
<mailbox>
<pop_server>111.222.333.444</pop_server>
<login>username1</login>
<password>********</password>
<alternate_address>username1@emailserver</alternate_address>
<send_to>alternate</send_to>
</mailbox>
</mailboxes>
<bunch of stuff at the end>
I wish to have this sorted by the ALTERNATE_ADDRESS portion of the data.
I have read so many posts and tried to adapt so many pieces of code to
fit my needs, but I just can't get this to work. I am a Network Engineer
who dabbles in code every now and then, but I am certainly not a programmer,
so please try to post in as simple terms as possible.
Thanks to anyone who may take the time to read this post, or that tries to
help me out - I really do appreciate the time & effort.