[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Creating XML

  • From: "Boudreau Pierre (NBSMELTING)" <BoudrePi@B...>
  • To: "'Sagar Shelke'" <sagars@m...>, xml-dev@x...
  • Date: Wed, 5 Apr 2000 12:09:36 -0300

ixmldomelement
Humm, ... lets see

Being a typical programmer, I am going straight to the code example...

Plug this into your favorite VB program

    Dim tempdoc As MSXML.DOMDocument
    Dim tempnode As MSXML.IXMLDOMNode
    Dim tempelement As MSXML.IXMLDOMElement
    Dim tempattribute As MSXML.IXMLDOMElement
    Dim root As MSXML.IXMLDOMElement
    
    'make an XML document
    Set tempdoc = New MSXML.DOMDocument
    
    'make a root node and set is as the root of our document
    Set root = tempdoc.createElement("MyRoot")
    Set tempdoc.documentElement = root
    
    'make a child node with one attribute and append it to the root
    Set tempnode = tempdoc.createNode(MSXML.NODE_ELEMENT, "MyNode", "")
    tempnode.Text = "MyNodeValue"
    root.appendChild tempnode
    'get the element interface to add attributes
    Set tempelement = tempnode
    tempelement.setAttribute "MyAttribute", "MyAttributeValue"
    
    'print out to a text file
    Open "MyXMLFile.xml" for output as #1
        Print #1, root.XML
    Close #1



I did not try to compile this, but there should make you an XML file

Pierre Boudreau
Alpha Centauri Inc.



-----Original Message-----
From: Sagar Shelke [mailto:sagars@m...]
Sent: Tuesday, April 04, 2000 9:20 AM
To: xml-dev@x...
Subject: Creating XML


Hi all,

I am trying to create XML  data out of a treeview object on a windows
system. Typical way is to write tags as if u are writing a text file.

My question is if it is possible to create XML data using MSXML parser and
DOM . 

A small sample would be most appreciated.

Thanks in advance,

Sagar Shelke

Software Engineer,
Mastek Limited

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************


***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.