473,661 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Started With Array Serialization

I have a basic understanding of XML and I have a similar basic grasp of
VB.NET for developing Windows applications. I am still struggling with the
when/where/how in the proper use of OO classes and such.

I currently have a set of XML tables that represent serialized arrays that I
need to be able to read into a VB application, deserialize to arrays, modify
some values and then re-serialize the arrays.In googling to various
resources I believe that I want to use attributes such as XmlArray and
XmlArrayItem. The samples I found are mostly in C# (I did convert them to VB
to study them) and it is not clear to me exactly how to use the approaches.
I also found several other samples where the XmlArray attributes are not
used for this type of situation - they appear to use a more brute force
approach?

As an example, I have the schema for one of the XML files below. As you can
see, it has nested arrays. There can be several sets of "SubScore" values
within several sets of "Score" values.

Question: Can anyone suggest resources that might include examples I could
use as models to accomplish this. I think I need to build a set of classes
to define the various array structures and their XML structure but I am
stuck trying to do that.

Thanks in advance for any pointers or advice.

Wayne
=============== = Sample Schema =============== ======
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ArrayOfUnit ScoresTableEnti ty" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="ArrayOfUn itScoresTableEn tity" msdata:IsDataSe t="true">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="UnitScore sTableEntity">
<xs:complexType >
<xs:sequence>
<xs:element name="ShowId" type="xs:string " minOccurs="0"/>
<xs:element name="ClassId" type="xs:string " minOccurs="0"/>
<xs:element name="RoundId" type="xs:string " minOccurs="0"/>
<xs:element name="UnitId" type="xs:string " minOccurs="0"/>
<xs:element name="Score" minOccurs="0" maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="JudgeId" type="xs:string " minOccurs="0"/>
<xs:element name="JudgeType " type="xs:string " minOccurs="0"/>
<xs:element name="JudgeNumb er" type="xs:string " minOccurs="0"/>
<xs:element name="SubScore" minOccurs="0" maxOccurs="unbo unded">
<xs:complexType >
<xs:sequence>
<xs:element name="ScoreType " type="xs:string " minOccurs="0"/>
<xs:element name="ScoreValu e" type="xs:string " minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Nov 12 '05 #1
0 2179

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

Similar topics

6
1730
by: Buddy Ackerman | last post by:
I created a simple class: Public Class MyTestClass Public Test() As String End Class I tried to assign some values to the array Test() and display them like this:
3
3073
by: Franz | last post by:
Let me describe the flow of my program first. 1. Deserialize data from xml file. 2. Addition of "PersonType" class to the AllPersonalData. 3. Serialize data back to the xml file. My question is I have to use an array PersonType in the AllPersonalData class. But if I have to implement the "Addition of PersonalType" (i.e. the step 2), I have to use ArrayList instead of a fixed length array. I know that I can use the ArrayList as an...
5
12043
by: Abraham Lopez | last post by:
Hi.. Is there a way to convert a System.Array to XML... If you know thanks very much... if you don't... Please do not respond stupid things like " Yes -- many ways."
1
4190
by: elziko | last post by:
My intention is to store an array of singles inside a DataTable so that it can me peristed somehow, maybe XML file, maybe Access/SQL Server I don't know yet so I'm just saving it as an XML file for testing. Here are my two procedures for saving the array and loading it abck in again. Private Sub Save 'create memory stream and formatter Dim msStorage As MemoryStream = New MemoryStream Dim fStorage As IFormatter = New BinaryFormatter
1
3738
by: parrot toes | last post by:
I tried to post this question before, but there was an error when posting. I case it did get posted and in order to avoid duplication, I'll just repost a summary. I have written a dotnet client that accesses a Axis provided web service. The client uses the code generated, using wsdl.exe, from the wsdl file provided by the web service provider. The web response has the following schema (roughly):
0
1332
by: Mrozik | last post by:
after parsing WSDL definition of java WebService, C# proxy class contains data strutures (I'm using RPC\encoded): public class DateString { /// <remarks/> public string value; }
5
19582
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was having a problem in the calling program. I searched online and found suggestions that I return an Array instead so I modified my code (below) to return an Array instead of an ArrayList. Now I get the message when I try to run just my webservice...
3
1694
by: Kevin Burton | last post by:
I have an XSD that is converted from a DTD that I am trying to clean up. There is a section in the XSD that looks like: <xs:element name="partnerID"> <xs:complexType mixed="true"> <xs:attribute name="name" type="xs:string"/> <xs:attribute name="roleType" type="xs:string"/> </xs:complexType> </xs:element>
5
3788
by: =?Utf-8?B?QXlrdXQgRXJnaW4=?= | last post by:
Hi Willy, Thank you very much for your work. C++ code doesnot make any serialization. So at runtime C# code gives an serialization error at "msg_file_s sa = (msg_file_s) bf.Deserialize(ms);" I thought that it is very hard to memory map structure array. I need both read and write memory mapped file at both side of C# and C++.
0
8428
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
8341
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
8754
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
8630
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...
1
6181
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
5650
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
4177
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
2760
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
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.