473,651 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Reading data from Xml in smart phones "

16 New Member
hi guys,

My Xml File

<xml version="1.0">
<Name>
<Firstname> Infowave </Firstname>
<Lastname> Homes </Lastname>
</Name>
</xml>

Here am use Parent element '<name> and child elements <Firstname><Las tname> ............... ........

Im my smart pfone when i cick button i need these two
names in two text boxes.......... ..........
I already try "Server.Transfe r" but this property is not support
Windows application. any one can give idea........... .......

Ganesh
Nov 27 '07 #1
2 1850
markmcgookin
648 Recognized Expert Contributor
Hi there,

you will need an xml reader to read in the xml values you want. Then use a nodelist to get the specific values you want and then save them.

i.e.
Expand|Select|Wrap|Line Numbers
  1.                     XmlDocument xmlDoc = new XmlDocument();
  2.                     xmlDetails.Load(xmlFilePath);
  3.                     XmlNodeList nodeList =               xmlDetails.GetElementsByTagName("Name");
  4.  
  5.                     string FirstName= "";
  6.                     string LastName= "";
  7.  
  8.                     foreach (XmlElement elem in nodeList)
  9.                     {
  10.                         foreach (XmlElement tempElem in elem.ChildNodes)
  11.                         {
  12.                             if (tempElem.Name == "FirstName")
  13.                             {
  14.                                 FirstName= tempElem.InnerText;
  15.                             }
  16.  
  17.                             if (tempElem.Name == "LastName")
  18.                             {
  19.                                 LastName= tempElem.InnerText;
  20.                             }
  21.                         }
  22.  
  23.                         break;
  24.                     }
  25.  
  26. this.textBox1.text = FirstName;
  27. this.textBox2.text = LastName;
  28.  
Nov 27 '07 #2
RedSon
5,000 Recognized Expert Expert
I deleted your other double post. Please do not do that again or there will be consequences.

-MODERATOR

Same for you Mark, but I deleted it (so your safe) :-P
Dec 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
12280
by: Martin Goldman | last post by:
Hello all, I've been struggling for a few days with the question of how to convert "smart" (curly) quotes into straight quotes. I tried playing with the htmlentities() function, but all that is doing is changing the smart quotes into nonsense characters. I also searched the web for quite a while and was unsuccessful in finding a solution. What puzzles me is that doing it the other way around is simple enough. For example, this works...
2
4267
by: Tim Hochberg | last post by:
During the recent, massive, painful Lisp-Python crossposting thread the evils of Python's whitespace based indentation were once again brought to light. Since Python' syntax is so incredibly brittle, and failure prone, it's amazing that we don't have more editor support for our feeble minds. To help reduce the severity of this crisis, I decided to take a whack at creating smart block copy and paste functionality. Anyway, I wrote some...
14
2669
by: David B. Held | last post by:
I wanted to post this proposal on c.l.c++.m, but my news server apparently does not support that group any more. I propose a new class of exception safety known as the "smart guarantee". Essentially, the smart guarantee promises to clean up resources whose ownership is passed into the function, for whatever defintion of "clean up" is most appropriate for the resource passed. Note that this is different from both the basic and the...
4
8218
by: grogerteal | last post by:
Hello, I am pretty new to programming and would like someone to help me get started on the program that I need to make. I hope it is not hard to do, but what I would like is a simple app that has a label which returns the color of a pixel that is in position x,y on the screen (i.e. the desktop @ 1024 x 768 pixels), where x and y are of course variable.
11
7022
by: Ron | last post by:
Hello, I'm having an aggravating time getting the "html" spewed by Word 2003 to display correctly in a webpage. The situation here is that the people creating the documents only know Word, and aren't very computer savvy. I created a system where they can save their Word documents as "html" and upload them to a certain directory, and the web page dynamically runs them through tidylib using the tidy extension to php4, thus causing the...
3
3215
by: red floyd | last post by:
I've got some code where somebody cut&pasted some comments from MS Word, and so these comments have "smart quotes" (in particular apostrophes) embedded. The apostrophe is character hex 0x92. 2.1 indicates that characters not in the source character set are converted to the universal character name that designates the character. So far, so good. The non-source character gets translated. No big deal.
5
2892
by: Noozer | last post by:
I'm looking for a "smart folder" program to run on my Windows XP machine. I'm not having any luck finding it and think the logic behind the program is pretty simple, but I'm not sure how I'd implement this. I've done some VB6 programming and dabbled in VS.Net. Can someone share some pointers in how I could implement the following? Basically, you drag a file to the "smart" folder and, depending on the type of file and settings for that...
0
1492
by: =?Utf-8?B?YmFtbm9sYQ==?= | last post by:
When using Windows Live Hotmail and the "bottom" reading pane option chosen, the messages list shows up but no message, not even when I (single) click on the message. The only way to open and read the actual message in the "bottom" reading pane format is to double click the message and read it in full view. This all happened when I accidentally fiddled with the divider between the messages list and the reading pane (I believe this is...
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.