Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML 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 November 27th, 2003, 09:46 AM
Registered User
 
Join Date: Sep 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default First contact with XML/Schema and MSXML

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:

Code:
<?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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact form XML attachments. retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 16th, 2008 09:52 AM
MSXML and Schema: Using for XML-Node creation foxforest XML 1 September 5th, 2006 02:19 AM
XML Parsing Problem when using MSXML magicwanda XML 1 December 9th, 2004 01:56 PM
XML Application Development with MSXML 4.0 petercor Forum and Wrox.com Feedback 6 October 18th, 2004 08:12 PM
Book: XML Application Development with MSXML 4.0 dzmi XML 1 August 8th, 2004 05:45 PM





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