axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DANIEL <tragola...@hotmail.com>
Subject problem axiom nodes - axiom elements
Date Tue, 21 Jul 2009 17:02:27 GMT
Hi list. I will explain my problem.
I have developed an aplication with axis.I receive a xml text with this
axiom node: 

<body>
<outline ng:id="13043" ng:unseen="True" type="rss" title="ESPN.com -
NBA" ng:feedScore="1" description="Latest NBA news from ESPN.com"
xmlUrl="http://sports.espn.go.com/espn/rss/nba/news" text="ESPN.com -
NBA" htmlUrl="http://espn.go.com/nba/" ng:subscriberCount="3231"
ng:unread="True" ng:username="" ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/13043"
ng:updated="True" ng:passwordenc="" ng:folderId="0"/></outline><outline
ng:id="20464521" title="Fuentes de ejemplo (castellano)" text="Fuentes
de ejemplo (castellano)"/><outline ng:id="20464566" title="Lista de
canales importados" text="Lista de canales importados"><outline
ng:id="20464567" title="NewsGator Starter Pack" text="NewsGator Starter
Pack"/><outline ng:id="20464568" title="Fuentes de ejemplo (castellano)"
text="Fuentes de ejemplo (castellano)"><outline ng:id="20464569"
title="OSS" text="OSS"><outline ng:id="35905" ng:unseen="True"
type="rss" title="Barrapunto" ng:feedScore="0" description="La
informaci&#xF3;n que te interesa"
xmlUrl="http://backends.barrapunto.com/barrapunto.rss" text="Barrapunto"
htmlUrl="http://barrapunto.com/" ng:subscriberCount="334"
ng:unread="True" ng:username="" ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/35905"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="41547" ng:unseen="True" type="rss" title=" BULMA "
ng:feedScore="0" description="Biso&#xF1;os Usuarios de Linux de Mallorca
y Alrededores" xmlUrl="http://bulma.net/xml.php" text=" BULMA "
htmlUrl="http://bulma.net/" ng:subscriberCount="64" ng:unread="True"
ng:username="" ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/41547"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="431693" ng:unseen="True" type="rss" title="Hispalinux"
ng:feedScore="0" description=""
xmlUrl="http://www.hispalinux.es/node/feed" text="Hispalinux"
htmlUrl="http://www.hispalinux.es" ng:subscriberCount="25"
ng:unread="True" ng:username="" ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/431693"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="562052" ng:unseen="True" type="rss" title="Libertonia"
ng:feedScore="0" description="Las noticias que le interesan. Si no le
interesan, tenemos otras."
xmlUrl="http://libertonia.escomposlinux.org/backend.rdf"
text="Libertonia" htmlUrl="http://libertonia.escomposlinux.org/"
ng:subscriberCount="29" ng:unread="True" ng:username=""
ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/562052"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="858413" ng:unseen="True" type="rss" title="Diarios de Libertonia"
ng:feedScore="0" description="Las noticias que le interesan. Si no le
interesan, tenemos otras."
xmlUrl="http://libertonia.escomposlinux.org/diary.rdf" text="Diarios de
Libertonia" htmlUrl="http://libertonia.escomposlinux.org/section/Diary"
ng:subscriberCount="10" ng:unread="True" ng:username=""
ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/858413"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="1777825" ng:unseen="True" type="rss" title="Feed de
PlanetUbuntu.Es" ng:feedScore="0" description="&#13;&#10;Lugar de
reunion de bloguers ubunteros.&#13;&#10;"
xmlUrl="http://feeds.feedburner.com/PlanetUbuntuEs" text="Feed de
PlanetUbuntu.Es" htmlUrl="http://www.planetubuntu.es"
ng:subscriberCount="16" ng:unread="False" ng:username=""
ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/1777825"
ng:updated="True" ng:passwordenc="" ng:folderId="20464569"/><outline
ng:id="1920685" ng:unseen="True" type="rss" title="Magarto"
ng:feedScore="0" description="Blog de Software Libre, GNU/Linux y Mac OS
X" xmlUrl="http://magarto.com/blog/feed/" text="Magarto"
htmlUrl="http://magarto.com/blog" ng:subscriberCount="30"
ng:unread="True" ng:username="" ng:useDefaultCredentials="False"
ng:syncXmlUrl="http://services.newsgator.com/ngws/svc/Feed.aspx/1920685"
ng:updated="True" ng:passwordenc=""
ng:folderId="20464569"/></outline></outline></outline>
</body>.

I need to extract all elements of this node (outlines), and the
attributes of this.

Iam trying with the following code:
(child_body is the previus node )

child_body=axiom_node_get_next_sibling(child_head,env);
element_node_return=axiom_node_get_data_element(child_body_outline,env);
_first_element_body=axiom_element_get_first_element(element_node_return,env,child_body,&first_element_node);

children_iter=axiom_element_get_children(element_node_return,env,child_body); 


if(NULL != children_iter )
{
while(axiom_children_iterator_has_next(children_iter, env))
{
 child=NULL;
 axiom_element_t *child_ele = NULL;

child = axiom_children_iterator_next(children_iter, env);
child_ele = (axiom_element_t *)axiom_node_get_data_element(child, env);

 if(axiom_node_get_node_type(child_body_outline, env)== AXIOM_ELEMENT)
           	     {
printf ("\nChilds body:%s
\n",axiom_element_to_string(child_ele,env,child_body_outline)); 

while( axiom_util_get_next_sibling_element(_first_element_body,env,child_body,&next_node));
                        {
                           sibling_ele =(axiom_element_t
*)axiom_util_get_next_sibling_element(_first_element_body,env,child_body,&next_node);
                         printf("sibling: %s
\n",axiom_element_to_string(sibling_ele,env,child_body));	
                        }
}                 
}
        
}

Somebody can help me?? I think my problem is I dont understand the
differences between axiom nodes and axiom elements.
Regards


Mime
View raw message