Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2004, 07:57 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Header serialization problem

All,
I am trying to generate the following header when serializing a class to XML

<FpML
 version="4-0"
 xsi:type="TradeAffirmation"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.fpml.org/2003/FpML-4-0 fpml-main-4-0.xsd"
 xmlns="http://www.fpml.org/2003/FpML-4-0">
</FpML>

The class is currently declared as:
<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.fpml.org/2003/FpML-4-0"), _
 System.Xml.Serialization.
 System.Xml.Serialization.XmlRootAttribute([Version]:="4-0"), _
 System.Xml.Serialization.XmlRootAttribute([Namespace]:="http://www.fpml.org/2003/FpML-4-0", IsNullable:=false)> _
Public Class FpML
End Class


This generates the following:
<FpML xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.fpml.org/2003/FpML-4-0">
</FpML>

I am unsure how to get my code to generate the header correctly. Any ideas?

Many thanks
Paul





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML serialization is slower than Binary. Why ? navdeep General .NET 0 November 6th, 2007 06:14 AM
Date serialization problem aldwinenriquez C# 2005 0 July 12th, 2007 09:40 PM
XML Serialization rajeshnerenki General .NET 0 June 14th, 2004 08:50 AM
Serialization stream header MikoMax J2EE 0 April 1st, 2004 08:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.