473,799 Members | 2,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a strongly typed collection from an XML file

Is that possible ? Can I create a strongly typed collection from an XML
file?
Sorry, if this is too dumb, but since .net does it when you use certain
data objects, I was wondering whether I could create a strongly typed
collection reading from an XML file.

The reason I need this, is because I'm implementing a custom solution
for a multilingual website and I was thinking in use this so that, I
can do something like :

txtboxUsername. Text = LocalizationMan ager.Resources. Username;

I'd appreciate any comment.

Sep 26 '06 #1
1 1272

Check out my blog entry:

http://sholliday.space s.live.com/?_c11_BlogPart_ n=1&_c11_BlogPa rt_handle=cns!A 68482B9628A842A !125&_c11_BlogP art_FullView=1& _c=BlogPart
9/21/2005 date

I have several xml to object examples, including collections and child
collections.

If your xml is already "fixed" (you don't control it) , you can do a xml to
xml transformation to match the xml serializaton schema.


<cr************ @hotmail.comwro te in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Is that possible ? Can I create a strongly typed collection from an XML
file?
Sorry, if this is too dumb, but since .net does it when you use certain
data objects, I was wondering whether I could create a strongly typed
collection reading from an XML file.

The reason I need this, is because I'm implementing a custom solution
for a multilingual website and I was thinking in use this so that, I
can do something like :

txtboxUsername. Text = LocalizationMan ager.Resources. Username;

I'd appreciate any comment.

Sep 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3988
by: Sefa Sevtekin | last post by:
I am trying to bind a strongly-typed collection to a data grid on a windows form like: BeerInventory inventory = new BeerInventory(); inventory.Add(new Beer ("Hamms", "Hamms Brewing Co.", 3)); inventory.Add(new Beer ("Budweiser", "Anheuser-Busch", 1000)); inventory.Add(new Beer("Mulholland Rain", "City Brewers", 113));
2
2060
by: Mark | last post by:
Assume you have a strongly typed collection of a class called Person. The strongly typed collection implements IEnumerable so it can be databound to a server control like a DataGrid. The Person class has several public properties like FirstName, LastName, and Gender. What steps would it take to allow the collection to be sorted in multiple ways when bound to a DataGrid? In the past, I used the sort property of a DataView containing a...
7
2155
by: Robin | last post by:
In a current .Net solution (using VB.Net) has a 3 tier architecture of Web interface, Data Access Layer and Database. How do I implement business logic and class layers into this solution?
4
2522
by: Michael K. Walter | last post by:
I'd like to create a strongly-typed collection of objects that are indexed by a string value (key is a string). I'd also like to allow users to iterate over the collection using a For-each loop where an object of the contained type is returned (instead of just the standard DictionaryEntry object). - only allow objects of type MyObj to be added to the collection - return a MyObj type in the For-each loop What's the best way to do this?
0
1454
by: Jordan Bowness | last post by:
I make a similar post in another newsgroup, but this example is simplified somewhat. I have a component (cmpMyComponent) with 2 properties. The 1st property is a string value (Description) and the 2nd property is a strongly typed collection class (myCollectionProperty). The collection contains a simple class (myCustomClass) which has 1 text property (TextProperty).
20
5989
by: Dennis | last post by:
I use the following code for a strongly typed arraylist and it works great. However, I was wondering if this is the proper way to do it. I realize that if I want to implement sorting of the arraylist then I have to handle this with a sort method that uses comparer. I can reference the properties of the Arraylist directly such as dim mylist as new FrameList mylist.Add(new FrameStructure) mylist(0).first = "blabla..." mylist(0).second...
5
4233
by: Simon | last post by:
Hi all, I am writing a windows application using vb.net on the 1.1 framework. We have in the application, some strongly typed collections that have been written as classes that do not inherit from collection base, but use an internal collection, to hold the objects and then implement IEnumerator, see example below,
3
2050
by: Simon Hart | last post by:
Hi, I am trying to implement some functionality as seen in MS CRM 3.0 whereby a basic Xml is deserialized into an object which contains properties. What I want to do from here is; cast the basic object into a more strongly typed class which knows what properties to expect. The basic top level class is as follows: using System;
13
2072
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm designing the DAL (Data Access Layer) of my web application. I want every table to have a strongly typed object as wrapper arround the table. So that for example if the DAL found 3 records in the table then it sends a generic collection of 3 objects to the BLL (Business Logic Layer). But here is the problem:
0
9689
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
9550
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
10495
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...
1
10248
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
9085
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
5469
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
4148
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
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
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.