DP XML Tool

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

DP XML Tool

Post by Minutis »

Ok. Here is first part.
It's for viewing XML only. And all info is not refined. It needs more work, but this is just to show, that i am capable of making it :) If you are really going to move foward the very best idea would be to make dtd files and then i could adapt this program to use dtd files to make all information much more better formed.

Ahhh... BTW this program has one glich witch i was to lazy to fix: when you load XML file, resize window a little to see the xml tree.

V1.0- Ok, i think i will call this as version 1 because it provides basic viewing capability and it is more accurate than blueprints. Fixed some bugs. No editing possible now. And you must restart program every time you open different XML file.

V1.1- Cleaned a little; now you can open as many files as you want (there will be tabs in future to support multiple files editing at same time). Removed colors until i figure a way to do it better. You navigate with right mouse button clicking once, and edit window (witch still doesn't edit) popup after pressing twice with left mouse key. Now i will start working on editing.

V2.0- Here it is :). Primary version with editing support. You can load xml files, edit them and save them to new files. Didn't tested too much, hope you can do this for me. Please post any bugs you find. User interface is still only blueprint (will improve it now). So download and test it. BEWARE - make backup of XML before you test. Because still didn't add feature witch asks if you want to overwrite any files.

V3.1- Rewrote it almost from scratch with NetBeans GUI assistance:
[*] Tab support (just open as many files as you want).
[*] Edit and Delete elements (will improve GUI soon).
[*] Much better parsing method provides easy deleting and addings functions (adding still not done).
BEWARE - make backup of XML before you test. Because still didn't add feature witch asks if you want to overwrite any files.
You do not have the required permissions to view the files attached to this post.
Last edited by Minutis on Thu Feb 10, 2011 4:28 pm, edited 7 times in total.
User avatar
poltomb
L2j Veteran
L2j Veteran
Posts: 225
Joined: Wed Jul 13, 2005 7:13 am
Location: USA

Re: DP XML Tool

Post by poltomb »

You have your own thread now, so people don't have to sift through the posts to find your upload. :)
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

poltomb wrote:You have your own thread now, so people don't have to sift through the posts to find your upload. :)
Thanks. So anyone who tried pls comment :)
KadeL
Posts: 142
Joined: Sat Mar 15, 2008 11:04 pm
Location: Argentina
Contact:

Re: DP XML Tool

Post by KadeL »

works well :wink:
Sorry everyone for my very bad English, I speak Spanish
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: DP XML Tool

Post by jurchiks »

first of all - don't put spaces in jar's name.
second - when you start it and select file>open, it should first open the JAR directory, not my documents.
third - help>about doesn't work.
fourth - i suggest putting a space , or even better - id=value, name=value (this is for armor xmls)
fifth - some weird bug - I opened one armor xml, then tried opening other types (skill/weapon/etcitem) and I couldn't. I closed it and run the jar again, but now I can't open ANY file at all.
Edit: ok, this is weird. It doesn't update the window after you load another file, you need to scroll it up and down, even resing doesn't help. But still, when I open 1 file and try opening others, it opens, but only VISUALLY, closing/opening <list> again shows the contents of the first file.

Also I noticed that for every <for> tag, there's one empty supposedly <set> line.
Edit: change window title to something more descriptive.
You do not have the required permissions to view the files attached to this post.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

jurchiks wrote:first of all - don't put spaces in jar's name.
second - when you start it and select file>open, it should first open the JAR directory, not my documents.
third - help>about doesn't work.
fourth - i suggest putting a space , or even better - id=value, name=value (this is for armor xmls)
fifth - some weird bug - I opened one armor xml, then tried opening other types (skill/weapon/etcitem) and I couldn't. I closed it and run the jar again, but now I can't open ANY file at all.
Edit: ok, this is weird. It doesn't update the window after you load another file, you need to scroll it up and down, even resing doesn't help. But still, when I open 1 file and try opening others, it opens, but only VISUALLY, closing/opening <list> again shows the contents of the first file.

Also I noticed that for every <for> tag, there's one empty supposedly <set> line.
Edit: change window title to something more descriptive.
This is only blueprints of program. It has many of these bugs. I'll update it a little soon :)
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: DP XML Tool

Post by jurchiks »

Well, i'm just reporting.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

jurchiks wrote:first of all - don't put spaces in jar's name.
second - when you start it and select file>open, it should first open the JAR directory, not my documents.
third - help>about doesn't work.
fourth - i suggest putting a space , or even better - id=value, name=value (this is for armor xmls)
fifth - some weird bug - I opened one armor xml, then tried opening other types (skill/weapon/etcitem) and I couldn't. I closed it and run the jar again, but now I can't open ANY file at all.
Edit: ok, this is weird. It doesn't update the window after you load another file, you need to scroll it up and down, even resing doesn't help. But still, when I open 1 file and try opening others, it opens, but only VISUALLY, closing/opening <list> again shows the contents of the first file.

Also I noticed that for every <for> tag, there's one empty supposedly <set> line.
Edit: change window title to something more descriptive.
Thanks for viewing red lines was fixed, other ones will be fixed in near future. Updated first post with a little better version.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: DP XML Tool

Post by jurchiks »

Alright, that looks a lot better now!
But there's too much red imo, you could make it smth like:
skill id="value" name="value"
set name="value" val="value"

Also, mouse wheel scrolling is extremely slow, but I've noticed that in config editor too, so it might have smth to do with java in general.

you've fixed the second too, that's also good.
but the fifth is still there, I can only open 1 file, the others are opened kind of in background. In that screenshot I posted, you can view the list below the white space and expand it all, but what's at the top is another file. So when you open second file, the first one is not closed.

And one more thing - when you double-click on anything (slow click, to edit the value) it shows you the html code with html and font tags. You shouldn't probably use html for that or at least figure out how to hide it.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

jurchiks wrote:Alright, that looks a lot better now!
But there's too much red imo, you could make it smth like:
skill id="value" name="value"
set name="value" val="value"

Also, mouse wheel scrolling is extremely slow, but I've noticed that in config editor too, so it might have smth to do with java in general.

you've fixed the second too, that's also good.
but the fifth is still there, I can only open 1 file, the others are opened kind of in background. In that screenshot I posted, you can view the list below the white space and expand it all, but what's at the top is another file. So when you open second file, the first one is not closed.

And one more thing - when you double-click on anything (slow click, to edit the value) it shows you the html code with html and font tags. You shouldn't probably use html for that or at least figure out how to hide it.
Updated first post. Coloring will be done a little later :) Mouse wheeling is not that important yet. And fixed opening other XML files. Now I will work on editing the file.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

Updated first post. Please test this tool.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: DP XML Tool

Post by jurchiks »

Hmm...
1 left click on the list, and it asks you to rename it. the only way to open list is to right-click. kinda weird
You can't add/delete lines (table/set/for).
The fields should probably be editable separately, not all in 1 line...
You could expand it like this: open the program, select the "data/stats" folder. Then choose what you want to edit - skills/armor/weapons. Then a search function to find what you're looking for, preferably in tabs so you don't get lost or have to open multiple instances. Naturally the results could be returned similarly to notepad++.
But those are just ideas.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

jurchiks wrote:Hmm...
1 left click on the list, and it asks you to rename it. the only way to open list is to right-click. kinda weird
You can't add/delete lines (table/set/for).
The fields should probably be editable separately, not all in 1 line...
You could expand it like this: open the program, select the "data/stats" folder. Then choose what you want to edit - skills/armor/weapons. Then a search function to find what you're looking for, preferably in tabs so you don't get lost or have to open multiple instances. Naturally the results could be returned similarly to notepad++.
But those are just ideas.
Thanks for your reply. Yea, User Interface is not my main priority now. I want to see if the whole parsing and saving works ok. Everyone should open as much .xml files as they can to see if everything gets parsed loaded into the tree and saved to the file. Thats what i want to finish until i move to UI.
User avatar
Minutis
Posts: 56
Joined: Thu Feb 22, 2007 2:01 pm

Re: DP XML Tool

Post by Minutis »

Updated first post with 3.1 version ;) After last exam (will be tommorow) will work more on it :)
mochitto
Posts: 87
Joined: Fri Jul 18, 2008 2:27 pm
Location: Slovakia

Re: DP XML Tool

Post by mochitto »

Main class was not found.
Sorry for my bad english.
Post Reply