Subject: First contact with XML/Schema and MSXML
Posted By: lpinho Post Date: 11/27/2003 8:46:08 AM
Hi There,

    I'm using for the first time XML adn MSXML, and cannot see if there's any better way do something I need.

    We have a framework that is developed in .dot, Java and VB. Some features of this framework require XML usage, it was decided that .net would be the guide to the rest of the languages. So we came up with the following XML:


<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<IfxXmlDoc>
  <xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0" id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="IfxXmlDoc">
      <xs:complexType>
        <xs:sequence>
          <xs:element minOccurs="0" name="string1" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="int1" nillable="true" type="xs:int" />
          <xs:element minOccurs="0" name="long1" nillable="true" type="xs:int" />
          <xs:element minOccurs="0" name="byteArray" nillable="true" type="xs:string" />
          <xs:element name="doc1">
            <xs:complexType>
              <xs:sequence>
                <xs:element minOccurs="0" name="string1" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="string2" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="string3" nillable="true" type="xs:string" />
                <xs:element name="stringArray1">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element minOccurs="0" name="string" nillable="true" type="xs:string" />
                      <xs:element minOccurs="0" name="string" nillable="true" type="xs:string" />
                      <xs:element minOccurs="0" name="string" nillable="true" type="xs:string" />
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <string1>This is a simple example 1</string1>
  <int1>213</int1>
  <long1>213</long1>
  <byteArray>D2EK</byteArray>
  <doc1>
    <string1>This is a simple example 1</string1>
    <string2>This is a simple example 2</string2>
    <string3>This is a simple example 3</string3>
    <stringArray1>
      <string>array[0]</string>
      <string>array[1]</string>
      <string>array[2]</string>
    </stringArray1>
  </doc1>
</IfxXmlDoc>




Now this was done in an almost automatic way using XMLDocument, now for VB I would like to do the same with MSXML4.

The first part of this XML Document is a schema, can I build it programaticaly, using MSXML objects? Is there any support for this, or do I have to use the node object for every "piece" of XML?


Thank You for all the help,

Luís Pinho



Go to topic 6932

Return to index page 997
Return to index page 996
Return to index page 995
Return to index page 994
Return to index page 993
Return to index page 992
Return to index page 991
Return to index page 990
Return to index page 989
Return to index page 988