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

Re: Creation of XML documents

  • From: "Samuel R. Blackburn" <sblackbu@e...>
  • To: "Richard Anderson" <RJA@a...>
  • Date: Sat, 14 Nov 1998 06:52:30 -0500

createtextnode c
If a non-validating C++ library will help, take a look at the
XML classes in the freeware Win32 Foundation Classes (WFC)
at http://ourworld.compuserve.com/homepages/sam_blackburn/wfc.htm

HTH,

Sam

-----Original Message-----
From: Richard Anderson <RJA@a...>
To: XMLDEV <xml-dev@i...>; Wester, JJ (ICT) <j.j.wester@k...>
Date: Friday, November 13, 1998 10:26 AM
Subject: Re: Creation of XML documents


>> I would like to have a 'library' to which the application developer
>> could say 'using this DTD please
>> instantiate a XML document and help me to fill it in'.
>
>I've got a C++ toolkit that is under development that sort of mets these
>requirements. It has a SAX+DOM interface.   ( The COM variant will follow
>very shortly for use in VB etc )
>
>Using the SAX interface you can build a 'template' DOM and then fill in the
>missing bits.
>
>The toolkit has *no* dependancies on MSIE etc.
>
>Heres some sample code for creating an XML EMAIL:
>
>************ CODE SECTION START ****************
>
>pDoc = pDOMAPI->createDocument();
> pRootElement = pDoc->createElement( L"EMAIL" );
>pFrom = pDoc->createElement( L"From" );
> pRootElement->appendChild( pFrom );
>pFrom->setAttribute( L"Priority", L"High" );
> pFrom->setAttribute( L"DeliveryReceipt", L"Yes" );
> pFrom->setAttribute( L"ReturnReceipt", L"Yes" );
>
>pText = pDoc->createTextNode( L"RJA@a..." );
>pFrom->appendChild( pText );
>
>pTo = pDoc->createElement( L"To" );
>pRootElement->appendChild( pTo );
>pText = pDoc->createTextNode( L"enquires@a..." );
>pTo->appendChild( pText );
>
>pSubject = pDoc->createElement( L"Subject" );
>pRootElement->appendChild( pSubject );
>pText = pDoc->createTextNode( L"XML/DOM/SAX C++ Toolkit" );
>pSubject->appendChild( pText );
>
>pComment = pDoc->createComment(L"Main body of Email follows");
>pRootElement->appendChild( pComment );
>pBody = pDoc->createElement( L"Body" );
>pRootElement->appendChild( pBody );
>
>pText = pDoc->createTextNode( L"Seems OK so far." );
>pBody->appendChild( pText );
>
>pText = pDoc->createTextNode( L"I'll have to try harder to break it." );
>pBody->appendChild( pText );
>
>pPI = pDoc->createProcessingInstruction(L"PI",
>                                          L"That's all folks!" );
>
>pCC = pDoc->createElement( L"CC" );
>pText = pDoc->createTextNode( L"xml_toolkit@a..." );
>pCC->insertBefore( pText, NULL );
>pRootElement->insertBefore( pCC,pTo );
>
>CStdioWideStream stream;
>pDOMAPI->writeXML( pRootElement, &stream );
>
>*********** CODE SECTION END ***************
>
>If your interested I can send you the C++ alpha toolkit.
>
>Regards,
>
>Richard.
>
>***********************************************
>* E-Mail  mailto:RJA@a... *
>* WEB     http://www.arpsolutions.demon.co.uk *
>***********************************************
>
>
>
>xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
>Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
>To (un)subscribe, mailto:majordomo@i... the following message;
>(un)subscribe xml-dev
>To subscribe to the digests, mailto:majordomo@i... the following
message;
>subscribe xml-dev-digest
>List coordinator, Henry Rzepa (mailto:rzepa@i...)
>


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.