Help - Search - Members - Calendar
Full Version: Check XML menu files
UBCD4Win Forums > Other Support > Plugin Repository & Commercial software support
Johnnyg
I am creating a program that checks xml menu files.
Checks the menu choice levels if are right and makes some syntax checking, for all
xml menu files of directory with subdirectories.
Today i finished it and works. But the time it's not enough to
found bugs. So it's a beta version.
If this is good as idea then i can continue
(i will wanted and benqt opinion, since he had the first idea for something like this)
Please, say me your opinion.
Thanks

http://rapidshare.com/files/77093018/Check...00beta.rar.html

See into rar file for ReadMe and ResultTest files

Johnny
bengt
Thanks Johnny,
I made a quick test and it found some errors I made, nice, will test more with other errors

CODE
;AntiSpyware_chkXml.txt
; 17 Dec 2007  06:54:19

;Xml_Filename                           Result [Menu Levels]
;                                       [file => menu choice]
;==================================     ===========================

a2free_nu2menu.xml                      OK Programs/Anti-Spyware Tools/
                                           a2free.cmd => A-Squared Fri
adaware_nu2menu.xml                     OK Programs/Anti-Spyware Tools/
                                           adaware.cmd => Ad-Aware
                                           ad-aware.exe => Ad-Aware
avg_as_nu2menu.xml                      OK Programs/Anti-Spyware Tools/
                                           avg_as.cmd => AVG Anti-Spyware 7.5
CWShredder_nu2menu.xml                  Uneven quotes number
EZPCFix_nu2menu.xml                     OK Programs/Anti-Spyware Tools/
                                           EZPCFix.exe => EZPCFix
hijackthis_nu2menu.xml                  OK Programs/Anti-Spyware Tools/
                                           hijackthis.exe => HijackThis
rootkitty_nu2menu.xml                   OK Programs/Anti-Spyware Tools/
                                           RootKitty.exe => RootKitty
spybot_nu2menu.xml                      OK Programs/Anti-Spyware Tools/
                                           spybot.cmd,0) => SpyBot S&D
superas_nu2menu.xml                     OK Programs/Anti-Spyware Tools/
                                           superas.cmd,0) => SUPERAntiSpyware
winsockxpfix_nu2menu.xml                Uneven quotes number
bengt
I get this error on some entries, and I cannot locate the error, what is the error and what are part 1, and part 2?

fbwf_nu2menu.xml Quotes problem, part 1



CODE
<!-- Nu2Menu entry for FBWF-->
<NU2MENU>
  <MENU ID="System">
    <MITEM TYPE="POPUP" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\FBWF\FBWF.exe))" MENUID="FBWF">File Based Write Filter</MITEM>
  </MENU>

  <MENU ID="FBWF">
        <MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\FBWF\FBWF.exe))" CMD="RUN" FUNC="@GetProgramDrive()\Programs\FBWF\FBWF.exe">Start File Based Write Filter</MITEM>
        <MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\FBWF\FBWF.exe))" CMD="RUN" FUNC="@GetProgramDrive()\Programs\FBWF\FBWF.exe AUTO">Start File Based Write Filter/AUTO</MITEM>
        <MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\FBWF\FBWF.exe))" CMD="RUN" FUNC="@GetProgramDrive()\Programs\FBWF\FBWF.exe MANUAL">Start File Based Write Filter/Manual</MITEM>
  </MENU>
</NU2MENU>
Johnnyg
Hi benqt

Right, this is not a bug.
I supposed what the general format of xml menu file it must is:

part 1
MENU ID="Programs"
MITEM ID="Programs" .../MITEM
/MENU

part 2
MENU ID=
MITEM .../MITEM
/MENU
..
..
part n

Last part
MENU ID=
1 MITEM ..../MITEM>
2 MITEM ..../MITEM>
and so on
/MENU

So the part 1 has 6 quotes and your xml has different part 1
I have provided that only the last part has DISABLED or FUNC
commands.
The basic program supposition is what all parts except last
have the format:

MENU ID="xxxxxxxxx"
MITEM TYPE="POPUP" MENUID="yyyyyyyy">yyyyyyyy/MITEM
/MENU

The 6 quotes limit is only for 1st part.

Now must changed some things.
But i don't know all probable variants for each part.

Help me to continue
Now I believe that i don't believed.

Thanks

Johnny
Johnnyg
Please, someone that knows:

Is there a case a [MENU ID=].....[/MENU] menu part to includes
a backslash [\] without includes a path?

Thanks

Johnny
hilander999
QUOTE (Johnnyg @ Dec 18 2007, 06:21 AM) *
Please, someone that knows:

Is there a case a [MENU ID=].....[/MENU] menu part to includes
a backslash [\] without includes a path?

Thanks

Johnny

I do not understand what you are asking.
Please ask again.
Johnnyg
QUOTE (hilander999 @ Dec 18 2007, 12:34 PM) *
QUOTE (Johnnyg @ Dec 18 2007, 06:21 AM) *
Please, someone that knows:

Is there a case a [MENU ID=].....[/MENU] menu part to includes
a backslash [\] without includes a path?

Thanks

Johnny

I do not understand what you are asking.
Please ask again.


Hi hilander999
In xml menu file where exist DISABLED= and FUNC= there is a path.
Therefore if i scout a backslash this means what found a path.
This is true?
Or there are and other cases with backslash into a xml menu file?

Thanks

Johnny
pcuser
I just tested a build changing this:

QUOTE
@GetProgramDrive()\Programs\EZPCFix\EZPCFix.exe


to this:

QUOTE
\EZPCFix.exe


and it didn't work... Does this answer your question?
Johnnyg
QUOTE (pcuser @ Dec 18 2007, 11:37 PM) *
I just tested a build changing this:

QUOTE
@GetProgramDrive()\Programs\EZPCFix\EZPCFix.exe


to this:

QUOTE
\EZPCFix.exe


and it didn't work... Does this answer your question?

Thanks pcuser
sure you refer for my program. The program checks a specific structure.
No checks paths. For this reason i want to learn if one only backslash "\"
defined the presence of path. Or if the presence one "\" means any other.
The program hitherto cheks structures like this:

level 1
[MENU ID="Programs"..]
[MITEM]...."xxxxx xxx" xxxxxxxx[/MITEM]
[/MENU]

level 2
[MENU ID="xxxxx xxx"..]
[MITEM]...."yyyyy yyy" yyyyyyyy[/MITEM]
[/MENU]

level 3
[MENU ID="yyyyy yyy"..]
[MITEM]...."zzzzz zzz" zzzzzzzz[/MITEM]
[/MENU]
.....
....

level last
[MENU ID="zzzzz zzz"..]
[MITEM]...DISABLED=.....FUNC=......[/MITEM]
.....
.....
[/MENU]

mainly checks if the menu levels corresponded the one to other.
Also cheks for quotes, lessthan or greaterthan characters and some commands.

Because the program must found common typing mistakes, i attempt to learn
some informations for program upgrade.
I don't aspire the program resembles to internet explorer, but a mass checking
for common errors

So keep at first quastion: one "\" = path ?

Thanks

Johnny

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.