Problem with XML Document parsing

"Markus Wolters" <[email protected]> Tue, 20 Dec 2005 13:55:36 +0100 (MET)
Newsgroups gmane.linux.upnp-sdk.general
Message-ID <[email protected]>
Hi,

I'm trying to write a control point for av media server. I have to say that
I'm new to linux and upnp programming, so please don't be harried, if this
is an easy to solve problem. 
I have the discovery and subscription part working, but something went wrong
with my action response. The action result only has the browse tag with
correct symbols. In between the symbols were replaced by strings and I can't
navigate through it with the node/document/element functions.
I hope anyone could help me solving this problem, because it makes me going
crazy :-(

Thanks for the help


The result:

<Result>&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;
xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot;
xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;&gt;
&lt;container id=&quot;1&quot; parentID=&quot;0&quot;
childCount=&quot;7&quot; restricted=&quot;1&quot;
searchable=&quot;1&quot;&gt;&lt;dc:title&gt;Music&lt;/dc:title&gt;&lt;dc:date&gt;&lt;/dc:date&gt;&lt;upnp:artist&gt;&lt;/upnp:artist&gt;&lt;upnp:genre&gt;&lt;/upnp:genre&gt;&lt;res
duration=&quot;00:00:00&quot; 
protocolInfo=&quot;http-get:*:audio/x-mpegurl:*&quot;&gt;http://192.168.1.2:9001/m3u/1.m3u&lt;/res&gt;&lt;upnp:class&gt;object.container.musicContainer&lt;/upnp:class&gt;&lt;/container&gt;
&lt;container id=&quot;12&quot; parentID=&quot;0&quot;
childCount=&quot;3&quot; restricted=&quot;1&quot;
searchable=&quot;1&quot;&gt;&lt;dc:title&gt;Pictures&lt;/dc:title&gt;&lt;dc:date&gt;&lt;/dc:date&gt;&lt;upnp:class&gt;object.container&lt;/upnp:class&gt;&lt;/container&gt;
&lt;container id=&quot;16&quot; parentID=&quot;0&quot;
childCount=&quot;2&quot; restricted=&quot;1&quot; searchable=&quot;1&quot;&


My request looks like:

if(GlobalDeviceList !=
NULL)
{
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"ObjectID","0");
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"BrowseFlag","BrowseDirectChildren");
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"Filter","*");
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"StringIndex","0");
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"RequestedCount","");
	UpnpAddToAction(&actionNode,"Browse",TvServiceType[1],"SortCriteria","");
	printf("%s\n",ixmlPrintDocument (actionNode));
	ret =
UpnpSendActionAsync(ctrlpt_handle,GlobalDeviceList->Service[1].ControlURL,ServiceType[1],NULL,actionNode,CtrlPointCallbackEventHandler,"Browse");
	if(ret != UPNP_E_SUCCESS )
		printf("SendActionError: %d\n",ret);
}

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click