473,772 Members | 3,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to browse an xml file using xmltextreader and open file dialog

3 New Member
how can i specify dynamically
by using open file dialog box
Feb 29 '12 #1
1 1905
mary dayana
3 New Member
Expand|Select|Wrap|Line Numbers
  1. Dim count As Integer = 0
  2.  
  3.  
  4.         Dim s As [String]
  5.  
  6.         Dim elementlist As New ArrayList()
  7.         Dim reader As New XmlTextReader(TextBox1.Text)
  8.         While reader.Read()
  9.             Select Case reader.NodeType
  10.                 Case XmlNodeType.Element
  11.  
  12.                     count = count + 1
  13.  
  14.                     s = reader.Name
  15.                     elementlist.Add(s)
  16.  
  17.                     ComboBox1.Items.Add(s)
  18.  
  19.                     Dim swriter As StreamWriter
  20.                     swriter = File.AppendText(TextBox2.Text)
  21.                     swriter.WriteLine(s)
  22.                     swriter.WriteLine(count)
  23.  
  24.                     swriter.Close()
  25.                     Exit Select
  26.  
  27.             End Select
  28.  
  29.         End While
  30.  
  31.         MsgBox(" Entered sucessfully")
Feb 29 '12 #2

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

Similar topics

0
2525
by: gilgantic | last post by:
I get an "Invalid file" in my MIDlet when I tried to read a .txt file, using Connection.open(). My phone is a Nokia 3595 with mMode technology by AT&T. Here is my source code in my MIDlet: try { // Open File text file String filename = "http://www.someurl.com/File.txt"; HttpConnection connection = (HttpConnection)Connector.open(filename);
0
1650
by: Stephen | last post by:
could someone give me some advise on a problem I have. At present i have a web application which displays pdf files in a web browser using javascript and the window.open method and pointing to a web address like window.open(http://.........). I have been asked to find out if it is possible to do something similar but instead opening a file located on my web server e.g.(G:\psh-4.pdf). I would like to be able to display the file in the web...
1
4522
by: N. Graves | last post by:
Help me please? I'm have users import tables from other Access Database in one of the process needed to use my ADB. To do this the user opens a form with a field for the file directory and another field for the Access database name. I would like to replace this with a Open file Dialog box. Could you please share with me the best way or the easiest way to accomplish this task. Thanks for you time!
3
1989
by: GrantS | last post by:
I am needing to permit users to select files using the 'Open file' common dialog box. The format of the names of the files are along the names of: GB00((&X.001.jpg I am not able to show these files in the dialog box for selection. I do need to use filters (cannot use (*.*| all files) I tried using the filter *.*.jpg without success. The filter string I have tried is:
2
3289
by: nissiml | last post by:
hi, i'm trying to open a asp.net web page that list files from a Windows application like winword and select a file from it . what do i have to do to make it happen, is it simple ? Thanks in Advance.
2
4420
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take that extension and use that as my filter criteria for the File Open dialog. Once the user selects a file with that extension (from the File Open dialog), I simply want to open that file (whether it is an .xls file, .txt file, etc.). I am...
0
2398
by: c_shah | last post by:
My XML file <FORMLIST> <InsuredInfo> <ANO>SR7501234</ANO> <ADATE>02/05/2007</ADATE> <InsName>SIRONA DENTAL SYSTEMS INC</InsName> <POLNO>DOL7501234</POLNO> <PEDATE>03/01/2007</PEDATE> <PXDATE>03/01/2008</PXDATE> <RevDATE></RevDATE>
5
1473
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi! I have an application that retrieves its settings from an Apache server XML file. The application bombs at this line for one user only: m_XMLReader = new XmlTextReader(configFileURL); Everybody else who logs into the laptop is able to use the application with no problems. Is it a permission problem ? If so, what kind of permissions are we talking about. I am very puzzled. The user is in another country and I can not
1
2120
by: yduani | last post by:
Hi, I'm running 2 different executables: One saving infinitely an excell file, Other Read it infinitely. time duration for Save/Open is randomally. This 2 applications works fine differently, but together they cause a colligion. (Can't save file. probably while other application reading it at the same time) My questions are: 1. Do I need to protect from 2 different sources tends to same resource? (I know the keyword "semaphore" /...
0
1327
by: Rinoa | last post by:
vb6 Vista I'm attempting to get the file path returned by an open file dialog so that I can put it in the text property of a text box. However, I have no idea what the ofd property would be. Help?
0
9620
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
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
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...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9912
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
8934
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...
0
6715
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
5354
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...
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.