Connecting Tech Pros Worldwide Forums | Help | Site Map

Retrieving text from xml message format

Newbie
 
Join Date: Mar 2009
Posts: 1
#1: Mar 10 '09
Hi All!
can anyone help me out in this issue?
Im developing an application on UPNP, im using SSDP message for discovering the device in a network.
SSDP message is in XML Format:
for EX:
Host:255.255.255.239:1900
Mx:1800s
NT:SSDP:alive
NTS:upnp:rootdevice
-
-

As i ve various types of devices in the network i have to extract NTS feild and should match with the ST(search Target) field in the search request to get a device response.
can anyone help me out to extract NTS field from this SSDP message.
Thank you all.

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,650
#2: Mar 10 '09

re: Retrieving text from xml message format


first, your example isn't XML.
second, what programming language do you want to use for this?

there are 2 basic ways:
- treat the XML as text and do a string search
- treat the XML as such and apply your programming language's XML functions
Reply