If you give us some CREATE TABLE and INSERT statements to create some test data that demonstrates the problem then you'll get a lot more people looking at it.
At the moment, all I see is a badly formatted query that I've not got the inclination to unpick.

I gave this a go and apart from the fact that you have syntax errors in the query you posted (a missing bracket and incorrect table name) it seems to work fine. I get the XML you gave as your output. Are you getting an error when you run your query, and if so what is it?

select xmlelement("g", XMLATTRIBUTES(g.contentgroup_id as "id",g.groupname as "label",
(select xmlagg(xmlelement ("c",XMLATTRIBUTES(c.title as "title",c.content_id as "id")))) as "A"))
as "A" from
(SELECT g.contentgroup_id AS id, g.groupname AS label, c.title AS label, c.content_id AS id
FROM content_ec c FULL OUTER JOIN contentgroup_ec g ON c.group_id = g.contentgroup_id
oRDER BY g.groupname ,c.title ASC );

It is useless to repost the same question in a new topic. They will be merged.
More it is really bad to do it without correctly formatting and without the useful information provided in the previous topic.

If you correctly formatted the query maybe I'd see this is not the same question.
In addition, we are not SQL syntax compiler so how could we know why the SQL is wrong without any information about your objects. The least you could do is to copy and paste your SQL*Plus session to show us what is the error and where it is.

I know that you are not an sql compiler. I asked here to verify the query. After me verify about the objects posted here.

SELECT xmlelement("g", XMLATTRIBUTES(g.contentgroup_id AS "id",g.groupname AS "label",
(SELECT xmlagg(xmlelement ("c",XMLATTRIBUTES(c.title AS "title",c.content_id AS "id")))
FROM A
) ))
FROM A
(SELECT g.contentgroup_id AS id ,
g.groupname AS label,
c.title AS label,
c.content_id AS id
FROM content_ec c
FULL OUTER JOIN contentgroup_ec g
ON c.group_id = g.contentgroup_id
ORDER BY g.groupname ,
c.title ASC
) A