Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MakeXML.cpp
Package: MakeXML.rar [view]
Upload User: shhsgm
Upload Date: 2013-12-24
Package Size: 95k
Code Size: 4k
Category:
xml-soap-webservice
Development Platform:
Visual C++
- // MakeXML.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include "tinyxml.h"
- #include <iostream>
- //#include <iostream>
- #include <sstream>
- #include <string>
- using namespace std;
- int main(int argc, char* argv[])
- {
- printf("Hello World!n");
- TiXmlDocument MyDocument;
- TiXmlDeclaration dec;
- dec.Parse( "<?xml version='1.0' encoding='GB2312'?>", 0, TIXML_ENCODING_UNKNOWN );
- MyDocument.InsertEndChild(dec);
- TiXmlElement 1stElement("message");
- MyDocument.InsertEndChild(1stElement);
- //保存到文件
- MyDocument.SaveFile("IE_ZANB_SERVER.xml");
- return 0;
- }
- //int main(int argc, char* argv[])
- //{
- // printf("Hello World!n");
- // TiXmlDocument *pDocument = new TiXmlDocument();
- //
- // TiXmlDeclaration dec;
- // dec.Parse( "<?xml version='1.0' encoding='GB2312'?>", 0, TIXML_ENCODING_UNKNOWN );
- // pDocument->InsertEndChild(dec);
- //
- // TiXmlElement *p1stElement = new TiXmlElement("message");
- // pDocument->LinkEndChild(p1stElement);
- //
- // {
- // TiXmlElement *p2ndElement = new TiXmlElement("head");
- // p1stElement->LinkEndChild(p2ndElement);
- //
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("type");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("MSG_ZANB_SERVER_REQ");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("seq");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("1");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("dir");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("vtdu_cms");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("src");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("src");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("dest");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("dest");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("ver");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("1.0");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("sid");
- // p2ndElement->LinkEndChild(p3rdElement);
- // TiXmlText *p3rdContent = new TiXmlText("sid");
- // p3rdElement->LinkEndChild(p3rdContent);
- // }
- // }
- //
- //
- // {
- // TiXmlElement *p2ndElement = new TiXmlElement("ie");
- // p1stElement->LinkEndChild(p2ndElement);
- //
- // {
- // TiXmlElement *p3rdElement = new TiXmlElement("IE_ZANB_SERVER");
- // p2ndElement->LinkEndChild(p3rdElement);
- //
- // {
- // TiXmlElement *p4thElement = new TiXmlElement("ServerType");
- // p3rdElement->LinkEndChild(p4thElement);
- // TiXmlText *p4thContent = new TiXmlText("3");
- // p4thElement->LinkEndChild(p4thContent);
- // }
- //
- // {
- // TiXmlElement *p4thElement = new TiXmlElement("Name");
- // p3rdElement->LinkEndChild(p4thElement);
- // TiXmlText *p4thContent = new TiXmlText("Virtual VTDU");
- // p4thElement->LinkEndChild(p4thContent);
- // }
- //
- // {
- // TiXmlElement *p4thElement = new TiXmlElement("NID");
- // p3rdElement->LinkEndChild(p4thElement);
- // TiXmlText *p4thContent = new TiXmlText("VTDU001");
- // p4thElement->LinkEndChild(p4thContent);
- // }
- //
- // {
- // TiXmlElement *p4thElement = new TiXmlElement("Password");
- // p3rdElement->LinkEndChild(p4thElement);
- // TiXmlText *p4thContent = new TiXmlText("123456");
- // p4thElement->LinkEndChild(p4thContent);
- //
- // }
- //
- // }
- // }
- //
- //
- // //保存到文件
- // pDocument->SaveFile("IE_ZANB_SERVER.xml");
- // return 0;
- //}