XML based language

Help
McLoo
2012-04-18
2013-06-12
  • McLoo

    McLoo - 2012-04-18

    Hi,

    i have XML files with XML-Tags instead of Function Names or types.
    like: <LOAD name="ld_something" into="my_varname" type="vartype">
    or <WORK name="workqueue">
    or <INCLUDE filename="filename.xml" section="some_definition" >

    In the FunctionList plugin i use the following regexp parse rule to define those tags:

    Function begin: <LOAD+name=\"
    Function List Name: +       (allowed characters)
    Function end: \".*>
    So it lists me all LOAD-Tags with their names.

    How can i get this to work in Source Cookifier? And is it possible to parse the Document for all those into="…" parameters to have them schown as fields/variables.

    kind regards
    McLoo

     
  • UFO

    UFO - 2012-04-18

    Hi,

    try like this:

    Input: <LOAD+name=\"(*)
    Output: \1

    Regarding your "fields/variables" I didn't get you.
    As an additional tagtype?
    Or right behind your function tags as parameters?
    So that you would have an output like this:
    "ld_something (my_varname)" ?

    cheers

     
  • UFO

    UFO - 2012-04-18

    *then try something like this:
    Input: <LOAD+name=\"(*)(|.*into=\"(*))
    Output: \1 (\3)

     
  • UFO

    UFO - 2012-04-18

    **if you want it to be parsed as "real" args:
    Output: \1|signature:(\3)

     
  • McLoo

    McLoo - 2012-04-19

    hi ufo-pu55y

    thanks for the replies. I tried the different methods, but didn't get it to work at all.
    Do i have to set the TagType to something specific?

    Here is a file example, maybe you can figure out the solution. That would really make my life much easier!

    <?xml version="1.0" encoding="UTF-8"?> 
    <LOAD name="ld_something" into="var_name1" type="GLOBAL"> 
        <WORKER> 
            <PARAMETER name="search" fieldname="tfsearch" fieldtype="TEXTFIELD"/> 
        </WORKER> 
    </LOAD>
    
     
  • UFO

    UFO - 2012-04-19

    Sorry, hehe.. I forgot about a bug which I fixed meanwhile but didn't release, yet.
    You still can't use space chars (" ") in expressions, so simply try like this:
    Input: <LOAD[]+name=\"(*)(|.*into=\"(*))

     
  • McLoo

    McLoo - 2012-04-19

    woohoo. work's like charm.
    My new favourite NPP plugin :-D

    thanks a lot!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks