473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tranform xmltype contents to expression ?

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

Jul 20 '05 #1
2 1818

"Abhinav" <ma************ @yahoo.dot.com> wrote in message
news:Q7******** ******@news.ora cle.com...
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
Jul 20 '05 #2


Robert A.M. van Lopik wrote:
"Abhinav" <ma************ @yahoo.dot.com> wrote in message
news:Q7******** ******@news.ora cle.com...
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


Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
14418
by: rabbit | last post by:
Hi all, I want to know, how can i insert the xml data using createXML() with CLOB in the xmltype column? I store the xml data at first in the clob column und want to import these data in the xmltype column in another table. But i get always the error message: java.sql.SQLException: ORA-00600: internal error code, arguments: , , , , , , , ORA-06512: in "SYS.XMLTYPE", line 0
4
3167
by: Luke Dalessandro | last post by:
I have some XML data that has mixed content XML tags that embed XHTML tags, for instance: <note>Somebody wrote this note in XHTML and wanto to <a href="link.html" target="_new">link</a> to a particular tag, and was also pretty sure that they wanted the following <ul><li>two</li><li>items</li></ul> to appear as a list. To make matters worse <sarcastic>how could this be worse?</sarcastic>, the XHTML can be mixed with our own tags.</note>
4
2777
by: Bradley Plett | last post by:
I have a relatively simple xsd which I am turning into a class using "xsd.exe". I then create a collection of these classes. I have run into one minor problem. When serializing my collection, I would like the names of the elements to be different from the class name as generated by xsd.exe. I don't want to change the class name itself, due to naming conventions. This is trivial to do after-the-fact by adding the "XmlType" tag to the...
0
2412
by: Daniel Lidström | last post by:
Hi, for what reason do I put XmlType and XmlRoot attributes on classes for XML serialization? I understand the reason for the top element, but not why it is sometimes put for child elements. -- Daniel
0
1517
by: David Mediavilla | last post by:
I am trying to check a SOAP signature with WSE 1.0 SP1, but with a certain transform I only get an "Unknown tranform" exception. The SOAP signature is like this: <ds:Signature> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod
1
1387
by: ChrisHarrington | last post by:
I load an XmlDocument which has an inline schema. I want to use XmlType property of XPathNavigator to get the type according to this inline schema. But XmlType is null for all nodes. I tried loading the documenting from an XmlValidatingReader to see if that made any difference but it did not. Any suggestions? Thanks Chris
2
4538
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Hi. Using VS2005, .NET 2.0. I have an xml document that I want to go through and set the values on attributes of elements. The elements are complex types defined in my schema (xsd) files. I can iterate the document and get my XmlType and XmlBaseType values just fine. However, as soon as I call SetValue to write to an attribute, the
0
2637
by: stepby | last post by:
Hi All, I am using the ASP as the server side language. I would like to ask how to retrieve the whole xml form the xmltype datatype in the database. I have found some SQL example to retrieve specific information in the xmltype datatype. SELECT a.col1.extract('//TABLE_NAME').getStringVal() as hello FROM tab1 a And I would like to ask how to retrieve the whole xml and store in what kinds of object in ASP.
0
2123
by: =?Utf-8?B?bW90eWxpaw==?= | last post by:
I want to expose my classes via web services in a different format. Using XmlAttributeAttribute and XmlElementAttribute works fine. But XmlType does not in all cases. If I have a class decl: public class InternalFoo {} the schema generated is just fine for public internalFoo. But if I have a
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.