473,320 Members | 1,862 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,320 software developers and data experts.

optional attributes

Hi,

I have a class as follows that is output to Xml using the serialiser.

<Serializable()>
Public Class ExchangeRiskCoverRiskEvent
<System.Xml.Serialization.XmlAttribute(Form:=Xml.S chema.XmlSchemaForm.Unqualified)>
Public qualifier As System.String

<System.Xml.Serialization.XmlText()Public value As System.String

End Class
I would like the qualifier field to be optional, ie,

<risk_event>XXX</risk_event>

OR

<risk_event qualifier="YYYY">XXX</risk_event>

Is there a way of doing this?

Regards,
Gavin


Oct 31 '06 #1
0 1053

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

Similar topics

5
by: Han | last post by:
Using preg_match_all, I need to capture a list of first and last names plus an optional country code proceeding them. For example: <tr><td>AU</td><td>Jane Smith</td></tr>...
1
by: Edwin G. Castro | last post by:
Is there a way to handle optional attributes in xslt? I'd like to determine if an attribute exists and do some action if it does. Otherwise, I want to take some other action or simply do...
4
by: Eric Anderson | last post by:
I'm not sure if this is the correct place to post this question so please feel free to redirect me if needed. I am writing a XSL transform document to perform a transform on an XML document. I...
1
by: Nik | last post by:
Hello, I'm writing a validation schema for some XML and I wonder if there is a good way to validate the following scenario: The element: <foo bar.1="1" bar.2="2" bar.4="4" tar="3"/> The...
7
by: Haines Brown | last post by:
I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave...
0
by: Dominic Messenger | last post by:
I have several elements that have optional child elements and attributes that are xs:dates. I have been using System.DateTime and the XmlAttribute/XmlElement attributes, but these will never work...
16
by: ad | last post by:
Does C#2.0 support optional parameters like VB.NET: Function MyFunction(Optional ByVal isCenter As Boolean = False)
3
by: LJ | last post by:
I am trying to define two xml attribute in my xsd so that they are mutual exclusive and one of them is required. For example, if I have two attributes, they are either <xsd:attribute name="p"...
2
by: Robert W. | last post by:
Hi, I have written a schema, specifying attributeFormDefault and elementFormDefault to be "qualified". If I parse an instance document validating against this schema with the DOMParser from...
8
by: Zohar | last post by:
Hi, I've created a web service which uses a structure that I've defined. This structure contains a string and a DateTime. When the WSDL is created the string field is assigned a minoccurs of 0,...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.