Home » Developer & Programmer » JDeveloper, Java & XML » nesting xmlelement within xmlforest (10.2.0.4 on Redhat)
nesting xmlelement within xmlforest [message #327073] Fri, 13 June 2008 11:27
kmack1nyc
Messages: 1
Registered: June 2008
Location: NYC
Junior Member
Here's how I want the xml to look:
<feature-group><group-desc>Rooms</group-desc><crest-group-code>C</crest-group-code><feature><feature-desc>Family Room</feature-desc><crest-feature-code>21</crest-feature-code></feature>

Using the below syntax I get an error:
select
xmlelement("feature-group",
xmlagg (
xmlforest (pfg_feature_group_name as "group-desc" ,
fg.sfeaturegroup_id as "crest-group-code") ,
xmlelement("feature",
fea_feature_name as "feature-desc" ,
fc.ifeature_id as "crest-feature-code" )

I get the following error:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'SYS_IXMLAGG'

the following works - but not when I insert the element "feature"
select xmlelement("feature-group",
xmlagg (
xmlforest (pfg_feature_group_name as "group-desc" ,
fg.sfeaturegroup_id as "crest-group-code" ,
fea_feature_name as "feature-desc" ,
fc.ifeature_id as "crest-feature-code" ))
)

Previous Topic: Trying to set entity object attributes' control hints values to generic classes
Next Topic: calling procedure in java
Goto Forum:
  


Current Time: Thu Apr 18 20:57:25 CDT 2024