473,237 Members | 1,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

XmlArray with two unrelated XmlArrayItems

Hi,

does anyone know if I can have an XmlArray with two unrelated
XmlArrayItem,
i.e. where the items are not child-parent related?

I tried this, but I get an exception when creating the XmlSerializer.
[XmlArray("customers"), XmlArrayItem("names"),
XmlArrayItem("ids")]
(The classes of type "names" and "ids" are not related.)

Thanks for any insight!

Jun 27 '08 #1
2 5136
On 30 Mai, 14:06, bar...@bluezone.no wrote:
Hi,

does anyone know if I can have an XmlArray with two unrelated
XmlArrayItem,
i.e. where the items are not child-parent related?

I tried this, but I get an exception when creating the XmlSerializer.
* * * * [XmlArray("customers"), XmlArrayItem("names"),
XmlArrayItem("ids")]
(The classes of type "names" and "ids" are not related.)

Thanks for any insight!
Oooops, the code line above is not correct. But my question is still
valid: "can I have an XmlArray with two unrelated XmlArrayItems, i.e.
where the items are not child-parent related?".
Jun 27 '08 #2
You should just be able to declare multiple [XmlArrayItem] entries; what
error are you getting? Alternatively, you can actually do the same thing
with the [XmlElement] that accepts a Type:

[XmlElementAttribute("FOO", typeof(Foo))]
[XmlElementAttribute("BAR", typeof(Bar))]
public List<objectItems
{
get
{
return this.itemsField;
}
}

Marc
Jun 27 '08 #3

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

Similar topics

2
by: Abhijit Bhadra | last post by:
Hi , I was trying to build my project in VC with latest Service Packs but got this error . C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :...
13
by: dungping5 | last post by:
This is a place for technology discussion in English. But some unrelated advertisements in Chinese writing appeared on this forum a while ago. I read Chinese, so understand the ads. They are...
0
by: Chatterbox | last post by:
Hello all, The XML file generated by the attached code correctly generates the <Items xsi:nil="true"/> element when serializing, but when deserializing, the Items field becomes an zero-sized...
2
by: Tim Tabor | last post by:
How can I delete records from a table with a criterion that depends on a value in an *unrelated* table? In other words, something like: DELETE tblPortfolioHistory.* FROM tblPortfolioHistory...
3
by: Kirsty Ryder | last post by:
Hi I have two tables containing largely unrelated data. Eventually I want a report that lists the contents of each table simultaneously in date order as it were. I think this is better explained...
7
by: Helen | last post by:
vb .net 200 crystal reports Oracl Acces Hi, I have all selection formula results needed from the main crystal report, called in the vb form (Oracle db) I now need to build in the logic in...
1
by: Ryker | last post by:
I have two unrelated tables. tblPO tblEADemographics I have a purchase order form containing the usual fields, but the following three I need to focus on. ClientSocial, Total, and...
0
by: Ross Presser | last post by:
I want to deserialize this XML: <Header> <Sender> <Credential domain="DUNS"> <Identity>12345</Identity> <sharedSecret>coyote</sharedSecret> </Credential> <Credential domain="email">...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.