473,405 Members | 2,262 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,405 software developers and data experts.

Extend the XML Schema via C# objects

I have C# objects/entities (like person or customer) which contains the usual
amount properties/attributes like name, address and so on..

I would like to "tag" some of these properties, so that when I'm generating
and XML Schema (via Wsdl for instance) the tags are displayed in the Schema
portion of the Wsdl. Something like the following snippet:

<?xml version="1.0" encoding="utf-8"?>
<xs:scheme attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:search="searchNS">

<xs:element name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="FirstName" type="xs:string" search:able="Y"/>
<xs:element name="LastName" type="xs:string" search:able="Y"/>
<xs:element name="Address" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

-----------------------------------
As you see, I would like to "tag" the FirstName, LastName elements while
Address is not. I would like to accomplish this with something like this in
the class definition:

[XmlTag(Namespace="search", attributename="able" attributevalue="Y")]
public string FirstName {
get {
return this.firstNameField;
}
set {
this.firstNameField = value;
}
}

I'm grateful for any tips or pointers!
Mar 13 '06 #1
0 897

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

Similar topics

0
by: Olaf Meyer | last post by:
I'm wondering if I can also express uniquness constraints on attributes of objects that I have referenced from somewhere else. To be a bit more precise here a short and simple XML document. The...
10
by: Jerzy Karczmarczuk | last post by:
Gurus, before I am tempted to signal this as a bug, perhaps you might convince me that it should be so. If I type l=range(4) l.extend() l gives , what else... On the other hand, try
7
by: Andrei Ivanov | last post by:
This happend again, but now, postgresql tells me where it happens: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: did not find '}' at end of input node pg_dump: The...
7
by: Robert Stearns | last post by:
I ran the following bit of SQL and my PRIMARY KEY wound up in schema SYSIBM called SQL.... not schema is3 called primary. The index registation did wind up there. Obviously there's something I...
4
by: cmc | last post by:
I need some clarification to help me understand the DB2 strucure more. The questions are about "implicit schema" 1. This is a very interest concpet that DB2 let every user to create new schema...
7
by: Rory Campbell-Lange | last post by:
I have a number of web applications which have a large amount of their logic written in plpgsql. For each particular application I have a separate instance of a database. If I need to update...
1
by: serge | last post by:
SQL BPA says the following: "One or more objects are referencing tables/views without specifying a schema! Performance and predictability of the application may be improved by specifying schema...
16
by: Bob Stearns | last post by:
The syntax diagram of DROP SCHEMA requires RESTRICT. Is there an easy way to drop an old, unnecessary, but populated schema?
1
by: v4u2chat | last post by:
Do I need to extend any of classes from AXIS to return multiple values? I'm exposing the following method as web service through AXIS to return multiple values. public ContactAddress...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.