BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in XmlSerializer

 
 
Page 15932 of 21350

How to: Specify an Alternate Element Name for an XML Stream

Blogger : Java Web Services and XML Features
All posts : All posts by Java Web Services and XML Features
Category : XmlSerializer
Blogged date : 2005 Dec 16

Using the XmlSerializer, you can generate more than one XML stream with the same set of classes. You might want to do this because two different XML Web services require the same basic information, with only slight differences. For example, imagine two XML Web services that process orders for books, and thus both require ISBN numbers. One service uses the tag while the second uses the tag . You have a class named Book that contains a field named ISBN. When an instance of the Book class is serialized, it will, by default, use the member name (ISBN) as the tag element name. For the first XML Web service, this is as expected. But to send the XML stream to the second XML Web service, you must override the serialization so that the tag`s element name is BookID.

Post comment (0)

Read comments or post a reply to : How to: Specify an Alternate Element Name for an XML Stream
Page 15932 of 21350

Newest posts
 

    Email TopXML