Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How do i get google xml tags?

How do i get google xml tags?

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

How do i get google xml tags?

Postby spoortigandhad » Mon Apr 11, 2011 7:09 am

Hi all,

I'm developing android Travel app. I want to display nearest hotels, restaurants etc. from current location. Is it possible to get google xml tags for parsing?

Thank you.
spoortigandhad
Junior Developer
Junior Developer
 
Posts: 10
Joined: Mon Apr 11, 2011 6:28 am

Top

Re: How do i get google xml tags?

Postby Openxcell » Mon Apr 11, 2011 8:01 am

spoortigandhad wrote:Hi all,

I'm developing android Travel app. I want to display nearest hotels, restaurants etc. from current location. Is it possible to get google xml tags for parsing?

Thank you.



To extract the name of the sender, the subject line, and the message body from the XML. You can get some idea from this and you can write your own code for hotels & restaurants etc.

private void parseMessage(String messageXml) {
try {
// parse the XML document into a DOM
Document messageDom = XMLParser.parse(messageXml);

// find the sender's display name in an attribute of the <from> tag
Node fromNode = messageDom.getElementsByTagName("from").item(0);
String from = ((Element)fromNode).getAttribute("displayName");
fromLabel.setText(from);

// get the subject using Node's getNodeValue() function
String subject = messageDom.getElementsByTagName("subject").item(0).getFirstChild().getNodeValue();
subjectLabel.setText(subject);

// get the message body by explicitly casting to a Text node
Text bodyNode = (Text)messageDom.getElementsByTagName("body").item(0).getFirstChild();
String body = bodyNode.getData();
bodyLabel.setText(body);

} catch (DOMException e) {
Window.alert("Could not parse XML document.");
}
}
Openxcell
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Mon Mar 28, 2011 1:59 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 5 guests