|
| ||||||||||
| Tags: library, programming, visual c, xml, xml parser |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to export data to XML from the visual C++
|
|
#2
| |||
| |||
| Re: How to export data to XML from the visual C++
You need to have some XML parser for these to export the data from the VC++ to the XML, but and you have to write different application to export those data to the XML format. And as the extent to I know you can use Dom Parser for this, off course first of all you have to download it from the internet, and then make use in the programming. And if suppose you still have some doubts you can simply refer to the MSDN library. |
|
#3
| ||||
| ||||
| Re: How to export data to XML from the visual C++
you can do this with the coding only, and for that you need to import some of the files and the libraries in your coding, see you can try this. Code: #import <msxml.dll> named_guids using namespace MSXML; |
|
#4
| |||
| |||
| Re: How to export data to XML from the visual C++
See first of all you need to create the XML file and then you have to import it in the visual C++ program using the name that you have mentioned. See I would like to give you one best example. XML file Code: <?xml version="1.0"?>
<cars>
<company name="AUDI">
<producer name="ABC">
<model>X6 Convertible</model>
<price currency="usd">60,000</price>
<horsePower>6000</horsePower>
<fuelCapacity units="gallons">13.5</fuelCapacity>
</make>
</company>
<company name="Mercedes">
<make name="benz">
<model>test model</model>
<price currency="usd">30,000</price>
<horsePower>5000</horsePower>
<fuelCapacity units="gallons">15.5</fuelCapacity>
</make>
</company>
</cars> Code: BOOL CXMLDOMFromVC::InitInstance()
{
AfxEnableControlContainer();
// .. statements
::AfxOleInit();
//..statements
return FALSE;
} |
|
#5
| ||||
| ||||
| Re: How to export data to XML from the visual C++
VC++.NET Data Retrieval and Export Application, allows a user to save the records in the grid to XML. And you can choose that data from almost each applications like either a SQL Server or Oracle or the Microsoft Access etc. And this is the application that you can download from the internet also and I have seen that on internet like you can download it for free also as a thirty days trial period. |
|
#6
| ||||
| ||||
| Re: How to export data to XML from the visual C++
See I have another idea also through which you can do the same, for that first of all you have to develop one class which will behave as usual std::stream but as well follow all the needed XML markings. Refer this code, and let me tell you this is just as an example, of course you have to make changes in your program, but before that include this library. Code: #include "engine.h"
#define BUFSIZE 256
ofstream a("example.xml");
XmlStream xml(a);
xml << prolog()
<< tag("example-tag")
<< tag("some-tag")
<< attr("int-attribute") << 1234
<< attr("double-attribute") << 345.789
<< chardata() << "This is the text"
<< endtag()
<< tag("empty-self-closed-tag")
<< endtag()
<< tag() << "computed-name-tag"
<< attr("text-attribute") << "a byte of text"
<< endtag()
<< tag("deep-tag")
<< tag("sub-tag-2")
<< tag("sub-tag-3")
<< endtag("deep-tag");
After this, used it in the VC++ program
template<class t> XmlStream& operator<<(const t& value) {
if (stateTagName == state)
tagName << value;
s << value;
return *this;
} |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to export data to XML from the visual C++" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Export and Import DATA from Tally | SoftwareGuy | Tips & Tweaks | 3 | 08-03-2012 02:18 AM |
| Import & Export Data | AnkitSingh007 | Off Topic Chat | 2 | 09-12-2011 03:18 PM |
| How to export data from tally to excel | Amitesh | Windows Software | 5 | 19-02-2011 02:35 PM |
| How to export MS Money data from one to other computer | Lauren Bacall | Windows Software | 2 | 13-05-2009 03:51 PM |
| How to export data from acess to excel | Gunter | Windows Software | 3 | 13-05-2009 12:45 PM |