Home » Developer & Programmer » JDeveloper, Java & XML » dynamic xml composition (oracle 10g)
dynamic xml composition [message #496235] Fri, 25 February 2011 07:08 Go to next message
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 #496236 is a reply to message #496235] Fri, 25 February 2011 07:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I don't understand the question.
What does mean "the xml in the fb_xml table is not EXECUTED it simply escaped by oracle"? What is EXECUTED? What is "escaped"? Where? When you do what?

Regards
Michel
Re: dynamic xml composition [message #496240 is a reply to message #496236] Fri, 25 February 2011 07:39 Go to previous messageGo to next message
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 (
      &quot;Form&quot;,       
        XMLELEMENT (&quot;elements&quot;,
              (SELECT XMLAGG (
                  XMLELEMENT (
                        &quot;element&quot;,
                         XMLELEMENT (&quot;property_name&quot;, 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 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: missing expression and then group function not allowed error
Next Topic: How To Control <Af:panelspliter> At Runtime
Goto Forum:
  


Current Time: Thu Mar 28 09:34:10 CDT 2024