* * *

Author Topic: XML tree view editor  (Read 18434 times)

vrull

  • Full Member
  • ***
  • Posts: 104
XML tree view editor
« on: October 02, 2012, 10:09:59 am »
A small project called XML Tree Editor started on SourceForge.net.
Link: https://sourceforge.net/projects/xmltreeeditor/

The goal is to make a simple generic editor for XML files for people who are not keen to go deep in details, but rather want to tweak some configuration files etc. The XML is represented as a tree view and all editing is done as setting names, values and attributes.
It also features a unit called XMLFile (to avoid confusion with XMLConfig) to keep and maintain configuration parameters, much like INIFile. The difference between XMLConfig (from Lazarus) and XMLFile is that later keeps values in text nodes, not in attributes. This allows much greater flexibility. Currently its own (I mean XML Tree Editor) config contains .bmp  and .png images along with other stuff.
Current status - initial release: working executables for Windows and Linux (Ubuntu) with basic functionality, source code and separately listed XMLFile unit.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: XML tree view editor
« Reply #1 on: October 02, 2012, 08:21:38 pm »
Thanks, that sounds like a nice tool ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

exdatis

  • Hero Member
  • *****
  • Posts: 662
    • exdatis
Re: XML tree view editor
« Reply #2 on: October 03, 2012, 08:24:17 am »
Thanks!

vrull

  • Full Member
  • ***
  • Posts: 104
Re: XML tree view editor
« Reply #3 on: October 30, 2012, 08:44:14 am »
New version 0.1.0.8 has been released with more functionality, improved user interface and translation capability. Amongst new features: copy, move and re-name XML tags, second "reference" XML read-only document to copy some parts from.

The download link is the same as in my initial post.

Note: XMLTreeEditor does not display XML document as text in any way. All manipulations are done on the tree view, internal logic maintains document integrity.

JD

  • Hero Member
  • *****
  • Posts: 1608
Re: XML tree view editor
« Reply #4 on: October 30, 2012, 12:13:44 pm »
New version 0.1.0.8 has been released with more functionality, improved user interface and translation capability. Amongst new features: copy, move and re-name XML tags, second "reference" XML read-only document to copy some parts from.

The download link is the same as in my initial post.

Note: XMLTreeEditor does not display XML document as text in any way. All manipulations are done on the tree view, internal logic maintains document integrity.

Where is the 0.1.0.8 version for Windows?

Thanks,

JD
Windows (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

mdalacu

  • Full Member
  • ***
  • Posts: 175
    • dmSimpleApps
Re: XML tree view editor
« Reply #5 on: October 30, 2012, 12:46:05 pm »
i can't compile it in Lazarus 1.0.2 on Win7, using version 0.1.0.8.
umovenode.pas(90,64) Error: Illegal type conversion: "TDOMNode" to "LongInt"
Any help?
Thank you.

EDIT: But it does compile using Code Typhoon 2.6...what am i missing?
« Last Edit: October 30, 2012, 12:49:18 pm by mdalacu »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: XML tree view editor
« Reply #6 on: October 30, 2012, 03:32:12 pm »
i can't compile it in Lazarus 1.0.2 on Win7, using version 0.1.0.8.
umovenode.pas(90,64) Error: Illegal type conversion: "TDOMNode" to "LongInt"
Any help?
Thank you.

EDIT: But it does compile using Code Typhoon 2.6...what am i missing?

The one not working 64-bit and the working one 32-bit ?

eny

  • Hero Member
  • *****
  • Posts: 1561
Re: XML tree view editor
« Reply #7 on: October 30, 2012, 09:30:59 pm »
Good excercise program.
Compiles correctly and runs on WinXP.
Couple of remarks:
  • File/New asks for a filename; should just ask for a root name.
  • When you make a change and try to close the program, a question should pop up if you want to save the changes (if any).
  • Copy - does not copy a node but replicates it. Better not name it Copy when it does not behave like Copy in all other programs.
  • Clicking on the Attribute cel and then not entering a name gives a critical error pop up
  • Tabbing out of the Attribute name column clears the name
  • Attribute name is not displayed when opening the node edit window
  • No dots after the Open recent menu item required
  • There is no Save option
  • Typo 'seconary':  scText := gConf.ReadAttribute(secName, amList.Actions[ i ].Name, 'seconary', emptyString);
  • Pop ups like Find window cannot be moved and block text
  • Move node makes program crash beyond recovery (has to be killed from task manager)
  • Typing text for the new node is extemely slow; see code below; what is that???
Code: Delphi  [Select]
  1.  try // just in case if something went wrong
  2.     frmNode.ShowOnTop;
  3.     while Assigned(frmNode) and (frmNode.ModalResult = mrNone) do
  4.       begin
  5.         Application.ProcessMessages;
  6.         Sleep(100); // for Linux
  7.       end;
All posts based on: Win10 (Win64); Lazarus 1.4.2 'stable' (#49524 win32) unless specified otherwise...

mdalacu

  • Full Member
  • ***
  • Posts: 175
    • dmSimpleApps
Re: XML tree view editor
« Reply #8 on: October 31, 2012, 07:24:49 am »
i can't compile it in Lazarus 1.0.2 on Win7, using version 0.1.0.8.
umovenode.pas(90,64) Error: Illegal type conversion: "TDOMNode" to "LongInt"
Any help?
Thank you.

EDIT: But it does compile using Code Typhoon 2.6...what am i missing?

The one not working 64-bit and the working one 32-bit ?
Both Lazarus versions are 32 bit run in 64bit OS.

vrull

  • Full Member
  • ***
  • Posts: 104
Re: XML tree view editor
« Reply #9 on: November 12, 2012, 08:02:35 pm »
Good excercise program.
Compiles correctly and runs on WinXP.
Couple of remarks:
....

Thank you for your testing and pointing out what you found.
I will investigate the issues and let you know the results.

vrull

  • Full Member
  • ***
  • Posts: 104
Re: XML tree view editor
« Reply #10 on: November 12, 2012, 08:14:50 pm »
i can't compile it in Lazarus 1.0.2 on Win7, using version 0.1.0.8.
umovenode.pas(90,64) Error: Illegal type conversion: "TDOMNode" to "LongInt"
Any help?
Thank you.

EDIT: But it does compile using Code Typhoon 2.6...what am i missing?
I suspect that for 64-bit compiler pointers have different length than LongInt, which causes this error. Sorry, can't prove, don't have 64 bit compiler.


The one not working 64-bit and the working one 32-bit ?
Both Lazarus versions are 32 bit run in 64bit OS.

anis2505

  • Full Member
  • ***
  • Posts: 201
Re: XML tree view editor
« Reply #11 on: November 12, 2012, 09:11:38 pm »
A small project called XML Tree Editor started on SourceForge.net.
Link: https://sourceforge.net/projects/xmltreeeditor/

The goal is to make a simple generic editor for XML files for people who are not keen to go deep in details, but rather want to tweak some configuration files etc. The XML is represented as a tree view and all editing is done as setting names, values and attributes.
It also features a unit called XMLFile (to avoid confusion with XMLConfig) to keep and maintain configuration parameters, much like INIFile. The difference between XMLConfig (from Lazarus) and XMLFile is that later keeps values in text nodes, not in attributes. This allows much greater flexibility. Currently its own (I mean XML Tree Editor) config contains .bmp  and .png images along with other stuff.
Current status - initial release: working executables for Windows and Linux (Ubuntu) with basic functionality, source code and separately listed XMLFile unit.

hi,

Good work  :)

When I run it my antivirus avast execute it on a sandbox. I know it's not infected but it's annoying you should do something with it.

regards
Dear Confucius you said {A picture is worth a thousand words}
I say {a good example is worth a thousand words}

vrull

  • Full Member
  • ***
  • Posts: 104
Re: XML tree view editor
« Reply #12 on: November 12, 2012, 11:02:02 pm »

When I run it my antivirus avast execute it on a sandbox. I know it's not infected but it's annoying you should do something with it.

regards
Sorry, did not catch what is going on. Do you mean, your anti-virus reports something wrong? I don't know, what is "avant" and how it works. Maybe it is a common issue and already discussed on some avant forums.
I have Windows machines at work only and cannot change their settings or install specific stuff for testing such issues. Sorry.

anis2505

  • Full Member
  • ***
  • Posts: 201
Re: XML tree view editor
« Reply #13 on: November 12, 2012, 11:47:19 pm »

When I run it my antivirus avast execute it on a sandbox. I know it's not infected but it's annoying you should do something with it.

regards
Sorry, did not catch what is going on. Do you mean, your anti-virus reports something wrong? I don't know, what is "avant" and how it works. Maybe it is a common issue and already discussed on some avant forums.
I have Windows machines at work only and cannot change their settings or install specific stuff for testing such issues. Sorry.

I meant AVAST antivirus.

It report it as suspecious program that's why it runs it on a sandbox. any I ignore it for the first and it stops running it on the sandbox
Dear Confucius you said {A picture is worth a thousand words}
I say {a good example is worth a thousand words}

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: XML tree view editor
« Reply #14 on: November 13, 2012, 09:34:15 am »
FYI: you can test an executable with multiple virus scanners at
http://virusscan.jotti.org/en
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus