 |
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:16
|
|
After what has easily been the most grueling programming project in my life, I have finally finished Version 1.0 of my ASP XML Technology editor. I don't think its too shabby considering I barely knew any HTML at the beginning of the semester and I had to research all the XML stuff myself.
Check it out.
I will also put a link to it on my Clash website, which can be recched simply by clicking the "www" link in any of my posts.
Current Functionality:
1) View, modify and rename any XML file on the server.
2) View all parts of the XML file in an XSL formatted table. This includes globals, technologies and helpers, applications and required techs, and activities and recipients.
3) Modify any of the above values in the XML file.
Current Limitations
1) If you want to view anything other than Simple_Tech_Test.xml, you have to know the name of the file and type it in. (There isn't much else up there anyway)
2) It can't yet add and delete any records/nodes; you are limited to modifying the ones already in the table.
3) There is no input validation at all.
Soon I hope to deal with those limitations. I should also think about making the pages look better.
Feedback would be appreciated. I turned it in as my Honors project when it was only half done, and my teacher said it surpassed expectations. But that was only the second level programming class. What do you guys think? Can we use this?
Last edited by Richard Bruns on 12-12-2001 at 07:58
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:16
|
|
quote: Originally posted by LDiCesare
Richard, if you could add a button or something for "new activity" and so on in the Modify form, it would be nice.
|
As I said, adding new stuff is on my "to-do" list. I was thinking of giving the user the option of generating the input form with a lot of blank input boxes under the filled-in ones. That way the parser would just read them all at once and save me a lot of trouble. I'd make the parser ignore the tech if the name box was blank, so that also gives the delete functionality we need.
quote: I am puzzled as to why your example file displays fine in Netscape but a modified file doesn't. |
Are you talking about displaying in the editor or viewing the straight XML file?
If the editor, that may be due to the fact that I broke all the rules of proper table generation. I have one sub procedure that dynamically draws each table with input elements from the XML file, so the number of columns is not constant throughout the table. Internet Explorer autimatically corrects for this, but Netscape may not. If it is a problem, I may have to write a different procedure for every part of the tech file, and manually insert extra formatting instructions to make a proper table.
If the problem is displaying the XML file, it may be due to the fact that the XML file generated by the code is one long unformatted string, while the example file is formatted nicely (I wrote it by hand.) I have to figure out how to make the editor format the file.
quote: It would be cool to put in a few carriage returns in the generated xml should some fool (like me) try to read it (I had to insert returns by hand before viewing it with my favorite editor). |
I would gladly do this if I knew how. Do you know the VB code for this off the top of your head?
When messing with a different tech file, I noticed that the editor only displays the first word of a technology; it cuts off anything after a space. I'll have to fix that as well.
Also I will need to optimize the code to try to get it to run faster. But that can wait until after the thing does what it is supposed to.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:16
|
|
quote: Do you know the VB code for this off the top of your head? |
Not really but it depends on what function you call. You can add (Chr(13) + Chr(10)) to the string you write, which is line-feed + carriage-return (Windows being *@!# to use 2 characters instead of one). If tat doesn't work, which method do you call to write your file? I think Write (but not Print) puts one at the end automatically, but calling it more than once would probably be bad in terms of performance.
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:16
|
|
quote: Originally posted by LDiCesare
I think Write (but not Print) puts one at the end automatically, but calling it more than once would probably be bad in terms of performance. |
I tried writing out the XML file like that, but it requires using the Filesystem object and that was hideously slow. It took (I timed this) two seconds for every line that I wrote to the file. So now I am loading all the data into a DOM parser and saving it by:
objDom.Save (Server.MapPath(datafile))
This runs a lot faster, but I can't figure out how to format it nicely. The stuff is loaded into the DOM with a plethora of procedures like this:
Sub SetTechValue(detailname, number)
Set Detail = objDom.createElement(detailname)
Entry.appendChild Detail
Detail.Text = Request.Form("technology" & detailname & number)
End Sub
I can't figure out where or how I put code in to make the output look nice. I guess I'll have to keep trawling the web.
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:16
|
|
Users now have the ability to add any number of new entries of any kind. From the start screen, you enter how many new entries you want, and what default values you want the new entries to have. This makes it easy to enter large amounts of data at once with only a few mouse clicks.
You can also delete any entry by simply erasing its name before you click "submit."
I have also fixed the bug that caused it to only display the first word of a name with spaces. Now the thing is actually a useful tool. It can do anything required to build up and edit the file, assuming the users know what they are doing. There is still no input validation, nor is there likely to be for a while.
Next, I need to modify it to deal with the changes in the XML file. I also need to come up with a better file management system and see if I can get output that is formatted to be human-readable.
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:16
|
|
I could probably adapt this to other XML files, like the military one, without too much trouble. But don't be fooled into thinking that this is anything other than a fancy XML file generator. It was designed to replace Notepad as an XML editing tool.
I wouldn't have a clue about how to do maps or any graphical stuff. This is all server-side, no scripting, which means that interactivity is close to nil.
All the entries have to be input at once, since the thing basically builds the XML file from nothing based on what is in the textbox elements. If you save to the same filename, it simply overwrites what is there. I haven't figured out how to load a file and only edit or change part of it.
Also, this thing is incapable of changing the structure of the XML file or any of the tag names. It relies on knowing exactly what the names of the tags are and how they are structured. Each and every one of those textboxes has to have a unique and loopable name.
I've only had one semester of VB and one for VB script, and XML wasn't in those classes at all. This thing is pushing my abilities to the limit.
Which, of course, makes it a lot of fun to work on.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:16. Apolyton Time is 00:16. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|