tranform xmltype contents to expression ?

Discussion in 'XML' started by Abhinav, Jun 24, 2004.

  1. Abhinav

    Abhinav Guest

    Hi ..

    I have the following sort of xml (In an xmlType in the database ..)


    <or_group>
    <operand>a</operand>
    <operand>
    <and_group>
    <operand>b</operand>
    <not_group>
    <operand>c</operand>
    </not_group>
    <and_group>
    </operand>
    </or_group>

    This needs to be evaluated as
    a+(b.(!c))

    Here, a/b/c are linked to functions which return true/false values, with
    the function taking some parameters.

    It is possible to do this by creating a linked list out of the tree, and
    evaluating in post fix using "native" planguages like C ..

    Would like to know if it is possible in PL/SQL .. or is it wishful
    thinking ?

    Any replies .. even if to say that it isnt possible .. appreciated :)

    Regards
    Abhinav
    Abhinav, Jun 24, 2004
    #1
    1. Advertising

  2. "Abhinav" <> wrote in message
    news:Q7ACc.35$...
    > Hi ..
    >
    > I have the following sort of xml (In an xmlType in the database ..)
    >
    >
    > <or_group>
    > <operand>a</operand>
    > <operand>
    > <and_group>
    > <operand>b</operand>
    > <not_group>
    > <operand>c</operand>
    > </not_group>
    > <and_group>
    > </operand>
    > </or_group>
    >
    > This needs to be evaluated as
    > a+(b.(!c))
    >
    > Here, a/b/c are linked to functions which return true/false values, with
    > the function taking some parameters.
    >
    > It is possible to do this by creating a linked list out of the tree, and
    > evaluating in post fix using "native" planguages like C ..
    >
    > Would like to know if it is possible in PL/SQL .. or is it wishful
    > thinking ?
    >
    > Any replies .. even if to say that it isnt possible .. appreciated :)
    >
    > Regards
    > Abhinav
    >

    well, the PL in PL/SQL stands for Procedural Language. In fact PL/SQL
    derives its syntax from ADA. So, if you know how to do it in C, you can do
    it in PL/SQL, And yes, there is an XML parser callable from PL/SQL.

    hth
    rob van lopik
    Robert A.M. van Lopik, Jun 24, 2004
    #2
    1. Advertising

  3. Abhinav

    Abhinav Guest

    Robert A.M. van Lopik wrote:
    > "Abhinav" <> wrote in message
    > news:Q7ACc.35$...
    >
    >>Hi ..
    >>
    >>I have the following sort of xml (In an xmlType in the database ..)
    >>
    >>
    >><or_group>
    >> <operand>a</operand>
    >> <operand>
    >> <and_group>
    >> <operand>b</operand>
    >> <not_group>
    >> <operand>c</operand>
    >> </not_group>
    >> <and_group>
    >> </operand>
    >></or_group>
    >>
    >>This needs to be evaluated as
    >>a+(b.(!c))
    >>
    >>Here, a/b/c are linked to functions which return true/false values, with
    >>the function taking some parameters.
    >>
    >>It is possible to do this by creating a linked list out of the tree, and
    >>evaluating in post fix using "native" planguages like C ..
    >>
    >>Would like to know if it is possible in PL/SQL .. or is it wishful
    >>thinking ?
    >>
    >>Any replies .. even if to say that it isnt possible .. appreciated :)
    >>
    >>Regards
    >>Abhinav
    >>

    >
    > well, the PL in PL/SQL stands for Procedural Language. In fact PL/SQL
    > derives its syntax from ADA. So, if you know how to do it in C, you can do
    > it in PL/SQL, And yes, there is an XML parser callable from PL/SQL.


    Thanks..
    But are there structural constructs available in pl/sql to do the
    transformation? data structures like B-Trees/Linked Lists ?

    Given an arbitrarily complex expression of the above format, there
    should be a result available in a scalable manner,,

    the parsing is available in PL/sQL and I am aware of that ..
    >

    TIA
    Abhinav
    > hth
    > rob van lopik
    >
    >
    Abhinav, Jun 25, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill Sneddon
    Replies:
    0
    Views:
    1,281
    Bill Sneddon
    Jun 24, 2003
  2. Cengiz

    Tranform XML with XSL

    Cengiz, Oct 17, 2003, in forum: XML
    Replies:
    0
    Views:
    423
    Cengiz
    Oct 17, 2003
  3. Mike
    Replies:
    7
    Views:
    2,696
  4. Stryder
    Replies:
    2
    Views:
    1,646
    Stryder
    Apr 16, 2009
  5. Stryder
    Replies:
    3
    Views:
    3,324
    Stryder
    Apr 29, 2009
Loading...

Share This Page