dynamic xml composition [message #496235] |
Fri, 25 February 2011 07:08 |
b_52globemaster
Messages: 51 Registered: July 2005
|
Member |
|
|
hi guys
i'm in a situation where i have to design dynamical xml table that gonna get inserted in a view:
late'si consider the following table:
CREATE TABLE FB_XML
(
ID NUMBER(10) NOT NULL,
FB_ID NUMBER(10),
XMLCONTENT CLOB
)
the xmlcontent field have content like the following:
XMLROOT(XMLELEMENT (
"Form",
XMLELEMENT ("elements",
(SELECT XMLAGG (
XMLELEMENT (
"element",
XMLELEMENT ("property_name", property_name)
)
)from database_properties
)
)
)
)
so late consider for the first row i insert for the
* id:1
* fb_id : 25
* xmlcontent:
XMLROOT(XMLELEMENT (
"Form",
XMLELEMENT ("elements",
(SELECT XMLAGG (
XMLELEMENT (
"element",
XMLELEMENT ("property_name", property_name)
)
)from database_properties
)
)
)
)
the code works "fine" here but the xml in the fb_xml table is not EXECUTED it simply escaped by oracle , i know i should add something so that the xml have to execute and generate
the xml output but didn't figure it out.
and thanks for you help
|
|
|
|
Re: dynamic xml composition [message #496240 is a reply to message #496236] |
Fri, 25 February 2011 07:39 |
b_52globemaster
Messages: 51 Registered: July 2005
|
Member |
|
|
when i try to view the data in the fb_xml table i got:
<content>select XMLROOT(XMLELEMENT (
"Form",
XMLELEMENT ("elements",
(SELECT XMLAGG (
XMLELEMENT (
"element",
XMLELEMENT ("property_name", property_name)
)
)from database_properties
)
)
)
) from dual</content>
|
|
|
Re: dynamic xml composition [message #496242 is a reply to message #496240] |
Fri, 25 February 2011 08:31 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
And?
Maybe it should be easier to understand what you have and want if you post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data.
Regards
Michel
|
|
|