XML Inheritance

I posted this message yesterday on a different group which may have been the 
wrong group, so I am not cross posting on purpose.

Hi,

     I have a question regarding how the .Net framework interprets schema 
definitions based on existing types.

I have (for the purposes of demonstration) a very simple types schema which 
contains some PersonName (T_PERSONNAME) and Address (T_ADDRESS) details as 
below.

  <?xml version="1.0" encoding="utf-16" ?> 

- <xs:schema xmlns=http://com.test.schemas.BaseTypes 
xmlns:b="http://schemas.microsoft.com/BizTalk/2003" 
targetNamespace=http://com.test.schemas.BaseTypes 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="BaseTypes">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="PersonName" type="T_PERSONNAME" /> 
  <xs:element name="AddressDetails" type="T_ADDRESS" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:complexType name="T_PERSONNAME">
- <xs:sequence>
  <xs:element name="Forename" type="xs:string" /> 
  <xs:element name="Surname" type="xs:string" /> 
  <xs:element name="MiddleName" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="T_ADDRESS">
- <xs:sequence>
  <xs:element name="Address1" type="xs:string" /> 
  <xs:element name="Address2" type="xs:string" /> 
  <xs:element name="Address3" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:schema>

I use these types to define a "Person" with some extensions.

  <?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns:typ=http://com.test.schemas.BaseTypes 
xmlns:b="http://schemas.microsoft.com/BizTalk/2003" 
xmlns=http://com.test.schemas.Person 
targetNamespace=http://com.test.schemas.Person 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation=".\basetypes.xsd" 
namespace=http://com.test.schemas.BaseTypes /> 
- <xs:annotation>
- <xs:appinfo>
- <b:references>
  <b:reference targetNamespace=http://com.test.schemas.BaseTypes /> 
  </b:references>
  </xs:appinfo>
  </xs:annotation>
- <xs:element name="Person">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="id" type="xs:string" /> 
- <xs:element name="PersonName">
- <xs:complexType>
- <xs:complexContent mixed="false">
- <xs:extension base="typ:T_PERSONNAME">
- <xs:sequence>
- <xs:element name="FathersName">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Forename" type="xs:string" /> 
  <xs:element name="Surname" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Alias" type="xs:string" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>

I use the xsdobjectgen .Net add-in tool to create data structures to support 
these schemas. These (to me) look fine

// Copyright 2004, Microsoft Corporation

// Sample Code - Use restricted to terms of use defined in the accompanying 
license agreement (EULA.doc)

//--------------------------------------------------------------

// Autogenerated by XSDObjectGen version 1.4.2.1

// Schema file: Person.xsd

// Creation Date: 21/03/2006 15:14:03

//--------------------------------------------------------------

using System;

using System.Xml.Serialization;

using System.Collections;

using System.Xml.Schema;

using System.ComponentModel;

namespace http___com_test_schemas_BaseTypes

{

public struct Declarations

{

public const string SchemaVersion = "http://com.test.schemas.BaseTypes";

}

 

 

 

[XmlType(TypeName="T_ADDRESS"),Serializable]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public class T_ADDRESS

{

[XmlElement(ElementName="Address1",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __Address1;


[XmlIgnore]

public string Address1

{ 

get { return __Address1; }

set { __Address1 = value; }

}

[XmlElement(ElementName="Address2",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __Address2;


[XmlIgnore]

public string Address2

{ 

get { return __Address2; }

set { __Address2 = value; }

}

[XmlElement(ElementName="Address3",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __Address3;


[XmlIgnore]

public string Address3

{ 

get { return __Address3; }

set { __Address3 = value; }

}

public T_ADDRESS()

{

}

}

 

[XmlType(TypeName="T_PERSONNAME"),Serializable]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public class T_PERSONNAME

{

[XmlElement(ElementName="Forename",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __Forename;


[XmlIgnore]

public string Forename

{ 

get { return __Forename; }

set { __Forename = value; }

}

[XmlElement(ElementName="Surname",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __Surname;


[XmlIgnore]

public string Surname

{ 

get { return __Surname; }

set { __Surname = value; }

}

[XmlElement(ElementName="MiddleName",IsNullable=false,DataType="string")]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public string __MiddleName;


[XmlIgnore]

public string MiddleName

{ 

get { return __MiddleName; }

set { __MiddleName = value; }

}

public T_PERSONNAME()

{

}

}

 

[XmlRoot(ElementName="BaseTypes",Namespace=Declarations.SchemaVersion,IsNullable=false),Serializable]

public class BaseTypes

{

[XmlElement(Type=typeof(http___com_test_schemas_BaseTypes.T_PERSONNAME),ElementName="PersonName",IsNullable=false)]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public http___com_test_schemas_BaseTypes.T_PERSONNAME __PersonName;


[XmlIgnore]

public http___com_test_schemas_BaseTypes.T_PERSONNAME PersonName

{

get

{

if (__PersonName == null) __PersonName = new 
http___com_test_schemas_BaseTypes.T_PERSONNAME(); 

return __PersonName;

}

set {__PersonName = value;}

}

[XmlElement(Type=typeof(http___com_test_schemas_BaseTypes.T_ADDRESS),ElementName="AddressDetails",IsNullable=false)]

[EditorBrowsable(EditorBrowsableState.Advanced)]

public http___com_test_schemas_BaseTypes.T_ADDRESS __AddressDetails;


[XmlIgnore]

public http___com_test_schemas_BaseTypes.T_ADDRESS AddressDetails

{

get

{

if (__AddressDetails == null) __AddressDetails = new 
http___com_test_schemas_BaseTypes.T_ADDRESS(); 

return __AddressDetails;

}

set {__AddressDetails = value;}

}

public BaseTypes()

{

}

}

}


 

// Copyright 2004, Microsoft Corporation
// Sample Code - Use restricted to terms of use defined in the accompanying 
license agreement (EULA.doc)

//--------------------------------------------------------------
// Autogenerated by XSDObjectGen version 1.4.2.1
// Schema file: Person.xsd
// Creation Date: 21/03/2006 15:14:02
//--------------------------------------------------------------

using System;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;

namespace http_com_test_schemas_Person
{

 public struct Declarations
 {
  public const string SchemaVersion = "http://com.test.schemas.Person";
 }

 


 
[XmlRoot(ElementName="Person",Namespace=Declarations.SchemaVersion,IsNullable=false),Serializable]
 public class Person
 {

  [XmlElement(ElementName="id",IsNullable=false,DataType="string")]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public string __id;
  
  [XmlIgnore]
  public string id
  { 
   get { return __id; }
   set { __id = value; }
  }

  
[XmlElement(Type=typeof(PersonName),ElementName="PersonName",IsNullable=false)]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public PersonName __PersonName;
  
  [XmlIgnore]
  public PersonName PersonName
  {
   get
   {
    if (__PersonName == null) __PersonName = new PersonName();  
    return __PersonName;
   }
   set {__PersonName = value;}
  }

  public Person()
  {
  }
 }


 [XmlType(TypeName="PersonName"),Serializable]
 public class PersonName : http___com_test_schemas_BaseTypes.T_PERSONNAME
 {

  
[XmlElement(Type=typeof(FathersName),ElementName="FathersName",IsNullable=false)]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public FathersName __FathersName;
  
  [XmlIgnore]
  public FathersName FathersName
  {
   get
   {
    if (__FathersName == null) __FathersName = new FathersName();  
    return __FathersName;
   }
   set {__FathersName = value;}
  }

  [XmlElement(ElementName="Alias",IsNullable=false,DataType="string")]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public string __Alias;
  
  [XmlIgnore]
  public string Alias
  { 
   get { return __Alias; }
   set { __Alias = value; }
  }

  public PersonName() : base()
  {
  }
 }


 [XmlType(TypeName="FathersName"),Serializable]
 public class FathersName
 {

  [XmlElement(ElementName="Forename",IsNullable=false,DataType="string")]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public string __Forename;
  
  [XmlIgnore]
  public string Forename
  { 
   get { return __Forename; }
   set { __Forename = value; }
  }

  [XmlElement(ElementName="Surname",IsNullable=false,DataType="string")]
  [EditorBrowsable(EditorBrowsableState.Advanced)]
  public string __Surname;
  
  [XmlIgnore]
  public string Surname
  { 
   get { return __Surname; }
   set { __Surname = value; }
  }

  public FathersName()
  {
  }
 }
}


 

My problem is that when I actually browse the web service I do not see any 
evidence of the PersonName base type which is inherited in Person.cs the line 
in the class is

 [XmlType(TypeName="PersonName"),Serializable]
 public class PersonName : http___com_test_schemas_BaseTypes.T_PERSONNAME


The browser output is

 

TestInheritance

Test
The test form is only available for methods with primitive types or arrays 
of primitive types as parameters. 
SOAP
The following is a sample SOAP request and response. The placeholders shown 
need to be replaced with actual values.

POST /XMLInheritanceSample/Service1.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/TestInheritance"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TestInheritance xmlns="http://tempuri.org/">
      <Person xmlns="http://com.test.schemas.Person">
        <id>string</id>
        <PersonName>
          <FathersName>
            <Forename>string</Forename>
            <Surname>string</Surname>
          </FathersName>
          <Alias>string</Alias>
        </PersonName>
      </Person>
    </TestInheritance>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TestInheritanceResponse xmlns="http://tempuri.org/">
      <TestInheritanceResult>string</TestInheritanceResult>
    </TestInheritanceResponse>
  </soap:Body>
</soap:Envelope>


Is there a reason for this? 

 

BTW I can see the T_PERSONNAME defined in the service descripton.

Thanks in advance.

 

 
 

0
Bakunin (1)
3/22/2006 11:35:29 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
502 Views

Similar Articles

[PageSpeed] 22

Reply:

Similar Artilces:

XML Header
Hi, I have some XML doc loaded in a C# Web Service. XmlDocument doc = new XmlDocument(); doc.LoadXml(myDoc); Code Missing to manipulate header (I would like to replace or manupulate all these XXXXX): <mso-XXXXXX productversion="XXXXXX"> <mso-application progid="XXXXX"?> doc.Save(myNewDoc); Any idea on how to access and manipulate data within the doc header? Thanks vbdev vb6dev2003 wrote: > I have some XML doc loaded in a C# Web Service. > XmlDocument doc = new XmlDocument(); > doc.LoadXml(myDoc); > > Code Missing to manipulate header ...

Read XHTML into XML
Hi all, I need to read/parse XHTML aspx pages and look for certain tokens and content. How can I use a XmlTextReader for this? If not, any other ideas? Thanks in advance, JA Reyes. Jose Antonio Reyes wrote: > I need to read/parse XHTML aspx pages and look for certain tokens and > content. How can I use a XmlTextReader for this? If not, any other ideas? If the pages are well-formed XHTML then it is possible to use XmlReader (in .NET 2.0/3.0) or XmlTextReader (in .NET 1.x) to parse the XHTML documents. You can also use the other XML APIs .NET provides so using XPathNavigator and/o...

How to invoke the xml editor?
I installed vs2005 on a new xp pro machine, and installed everything except C++. When I click on a file with a ".xml" extension it is opened with IE. When I click file/Edit with XML Editor, it opens it with Notepad. If I click File/Open With and select XML Editor, it opens it with IE. So, where is the xml editor? Can it be invoked from withing VS? Where? Bill * billsahiker@yahoo.com wrote in microsoft.public.dotnet.xml: >I installed vs2005 on a new xp pro machine, and installed everything >except C++. When I click on a file with a ".xml" extension it is >opened ...

show XML schema and values
I have an XML document that looks like the following: <record> <Field1>value1</Field1> <Field2>value2</Field2> <Field3>value3</Field3> </record> What I'm aiming to do is to show the data in a report as in the following example: record: Field1 value1 Field2 value2 Field3 value3 The "Field1-3"-elements can have any name, so I'm trying to get a table that has in one result column the element name, and in the second colum...

Offline synch using XML web-services
This is a bit long-winded. Can somebody read thru these 2 use cases, and tell me if it is feasible ? :- Use Case : Replication before Offline Synch Scenario 1 : Oracle Server , MSDE client 1. User clicks on 'Go Offline'. System creates a MSDE SQL database in laptop (client), gets the schemas of the tables in Oracle, creates corresponding tables in client's MSDE SQL (mapping Oracle datatypes to SQL datatypes). 2. Offline replication program reads in the tables of the server into a typed datasets, converts the typed datasets into XML, and stores the XML in the client. (XML serial...

XML Serialization ... how to truncate <?xml...
While xml serializing object how can I truncate <?xml ...?> this line alone? I need to send the serialized xml data to a web method ... since SOAP already have <?xml tag there was some confusion Any help would be greatly appreciated Thank you Regards Raj Raj wrote: > While xml serializing object how can I truncate <?xml ...?> this line alone? Serialize to an XmlWriter created with XmlWriterSettings where you set OmitXmlDeclaration to true. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ ...

String to xml document
Hi there, I was hoping someone can help me with a little problem I can't seem to find any answers to. I've got a form wich will be posted. On receiving the post I would like to parse a formvar to a xml document. The contents of this formvar (string) will be a valid xhtml document. Can someone give me a startertip (or more :-)) on how to achieve this? tnx in advance, James van der Veen Sjeems wrote: > I was hoping someone can help me with a little problem I can't seem to find > any answers to. > > I've got a form wich will be posted. On receiving the p...

Beginner of XML
I am a beginner of XML. I want to group some files together with a xml file. (it includes a text file, and an image file and a video file) Can someone show me some guidelines? Please help. ...

Valid xml to read from an xml file?
I'm using vb.net, i get an error at the reader line saying the remote server can't be found. Is the below even valid? dim reader as XmlTextReader reader = new XmlTextReader ("http://www.mysite.com/my.xml") do while (reader.Read()) 'do some action here response.write(reader) loop thanx chumley XmlTextReader uses System.Net.WebRequest under the covers -- see if you can figure out how to create a connection that way. Usually there's some proxy server information missing that you can enable if you use WebRequest directly, and then pass the result of GetResponse()...

Example eConnect XML documents
MSDN says the following: Installing eConnect schema When you include the schemas component of the eConnect install, the installer places schema files in a schemas folder on your computer. The following schema resources are available: The install places the .xsd schema files in the directory c:\Program Files\Microsoft Great Plains\eConnect9\XML Schema\Incoming XSD Individual Schemas. The files in the directory contain the schema for each eConnect XML document. The install places a file named eConnect.xsd that contains the schema definition for all eConnect XML documents. The install typicall...

Saving DataSet as XML in ADO format using VB.NET
Hi, I am trying to convert a lot of web reports from ASP/VB to ASP.NET/VB.NET. I would like to save my dataset in XML and then use XSLT to transform the XML. The catch is I would like to have the XML in the format that ADO uses versus the default format in which ADO.NET uses. Currently, I am using ADO within .NET, but I am concerned about the performance and it might improve if I used the native data providers for .NET. I am not sure if I am missing something but how do I save the .NET DataSet to XML in the OLD ADO format? Thanks for you help in advance and it is most appreciated. In the ...

XML variable for description on receipt?
Hi, I would like to add a description (actually all of those 3 extended descriptions) to display on the printed receipt under the main description. What is the variable to do that? Entry.Item.Description Entry.Item.ExtendedDescription Entry.Item.SubDescription1 Entry.Item.SubDescription2 Entry.Item.SubDescription3 R. "Zorian" <Zorian@discussions.microsoft.com> wrote in message news:F4425EAC-62B6-46FE-826A-D8BA2AA75DBB@microsoft.com... > Hi, I would like to add a description (actually all of those 3 extended > descriptions) to display on the printed receipt un...

Public Folder Permission inheritance #2
I'm trying to deny (actually remove the "create public folder") permission for the everyone group in ESM Exchange 2003. However, each level up I get inherited permissions. Where is this inherited from and how do I uninherite them without screwing things up? I only want to remove the above stated permission. I believe that I can uncheck "inherit permissions from parent" and then copy permissions, but is that the right thing to do? TIA Bobby "BJ" <bjanow@nospam.msn.com> wrote: >I'm trying to deny (actually remove the "create public ...

how do you ignore inherited members with XMLSerialization?
I have a class which inherits from a generated abstract base class. I simply want to hide some fields which are inherited from the base class when it is serialised. I have tried: public class Details : GeneratedDetails { [XmlIgnore] public new string Id { get{return base.lId;} set{Id = value;} } and: [XmlIgnore] public override string Id { get{return base.lId;} set{Id = value;} } } All these do is serialise the base members instead. As the base class is generated it is no good putting the [XMLIgnore] on the base class members (although this is what I have...

xml to SQL
Hey we have a project in which a company produces a XML page in reply to actions on it's site. I see that SQL 2000 works well with XML so Can someone point me in the right direction, I would like to take the XML from thier SQL and have it "post" to own sql server (add,create, data, modifity and delete data on the fly). I was looking at doing XML to HTML and then passing to some a ASP but if we can grab from the responsetext then we could save time and headaches. Now I really know next to nothing about XML but I am reading all the newsgroups and pulled now TONS of xml / sql stuff ...

new xml file is larger than the original
i'm working on a windows application that will edit and create xml files from another application. the original file is 83k, the one created by my vb.net program is 153k but all i add is a new xmlelement when i use the other program and add a xmlelement is only increased the file to 85k. how come my application increased 70k in size and also added the <?xml version="1.0"?> when i didn't tell it to. how do i duplicated a xml file and only add the xml element that i want to insert. where did the extra 70k come from. thanks here is my code: Dim newEvtEnr...

XSLT, XML to XML
Hello, I would like to transform this; <?xml version="1.0" encoding="utf-8" ?> <ProductList> <Product> <ID>1</ID> <Name>Gadget</Name> </Product> </ProductList> to this; <?xml version="1.0" encoding="utf-8" ?> <ProductList> <Product> <ID>1</ID> <Name>Gadget</Name> </Product> </ProductList> Basically I am hoping to use XslTransform and an XSLT stylesheet to change the format of some input XML so i...

xml data in excel
I have designed an excel template with tabular format (row by row input) for user input. I have to make the validation for those input. My question is that is it possible to use XML schema as the input format template and use it for the data validation like normal XML validation. Could anyone suggest me how to do that?? Million thanks. ...

http xml post
Hi I'm working on a http xml post (request/response). In my testing - I have been able to create and post xml string/stream and send response back. But now I've been told that I should "code the whole xml payload string as a single key" I'm not sure what this means and haven't been able to find anything about it. Can anyone help me with this? Thanks, Cindy "CindyH" <chenschel@new.rr.com> wrote in message news:eg9EfjVsIHA.4716@TK2MSFTNGP06.phx.gbl... > Hi > > I'm working on a http xml post (request/response). > > In my t...

Problem creating XML file...
Hi all! I'm trying to create this XML file: <?xml version="1.0" encoding="utf-8" ?> <Build type="Daily" sync="True" compile="True" assemble="True" > <Sync version="1.0.0.0" branch="QA"> <Directories basePath="//OpicsPlus/Source/Release" /> </Sync> </Build> For this, I'm trying to use the code below: private static BuildConfiguration SaveXML(XmlDocument xml, string fileName) { // Creates the nodelist XmlNodeList nodeList; XmlElement user = xml.Docume...

writing an xml inside XmlReader or XPathDocument to a file.xml
I believe this should be pretty elementary, but for some reason I cannot seem to think of how to write the an XML file from an incoming XML file. Basically this is what I do: Input: XmlReader instance from another module (beyond my control) Operations: XPathDocument = new XPathDocument(XmlReader); Then translation using XslTransform and output into XML2.xml NOW THIS IS WHAT I WANT TO DO: How can I ALSO write the Incoming XmlReader to a file ? I need this to help debug issues with the incoming file. So in essence I want to be able to take an XmlReader or XPathDocument and write it...

XML Import to MM2000
Please bear with me if I ask a question that has been previously addresssed by this group, to which I am new! Is it possible to import to MM2000 a file with extension .FXXML? My bank provides account transactions in that and .CSV formats only and I can only find reference in MM2000 to .OFC and .OFX files. Thanks in advance for any information. Dave "David Spencer" <dispencernomorespam@a1.net> wrote in message news:403b5e78$0$28382$91cee783@newsreader01.highway.telekom.at... > Please bear with me if I ask a question that has been previously addresssed > by this ...

XML vs. SQL Database
I am developing a home project to be later released as an online application. I am currently using XML to store game data, user/member data, and other. Assuming a user base of 10,000 active users, is there a conflict if one user is updating information and another user is creating data on the same xml file? For example: User 1: update inventory that exists in the XML file User 2: new user adding their inventory data in the XML file Thanks for your help. Michael "Michael Jesse" <michaeljesse1973@sbcglobal.net> wrote in message news:tUVDd.13357$iC4.7938@newssvr30.news....

Mapping XML to workbook
Hello, I'm trying to map XML elements to a workbook. Each column in the workbook has hundreds of rows, so the .XML map file is formatted in a such a way that excel detects an XML list is being made. When I drag the XML elements onto the workbook - to complete the mapping process - only half the columns acquire a blue border. (The blue border signifies the columns' contents are mapped to respective XML elements.) The problem columns only have their top two cells blue-bordered (with a blue star in the last cell). This seems to be an issue of Excel finding an empty cell in a...

XML Declaration is missing when I convert a dataset to xml
This is my first time trying to take the results of a query that reside in a Dataset and convert the dataset into an xml file. Everything works great, except that my resulting XML file is missing the xml declaration (the first line): <?xml version="1.0" encoding="iso-8859-1"?> Below is an example of the code I am using: dataset.Namespace = "RatesXML" Dim xmlFilename As String = "myXmlDocument.xml" Dim fsWriteXml As New System.IO.FileStream(xmlFilename, System.IO.FileMode.Create) Dim xmlWriter As New System.Xml.XmlTextWriter(fsWriteXml,System.Text...