hi everybody here is my problem I want to parsr a xml file,I just want to change an entity value like that
name to myname i write a code in c++ which is following
#include <string>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <list>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include "/usr/local/include/xercesc/parsers/SAXParser.hpp"
#include "/usr/local/include/xercesc/sax/HandlerBase.hpp"
#include "/usr/local/include/xercesc/util/XMLString.hpp"
using namespace std;
using namespace xercesc;
int main (int argc, char* args[]) {
XMLPlatformUtils::Initialize();
char* xmlFile = "/home/manish/conf/mapred-site.xml";
cout<<xmlFile ;
SAXParser* parser = new SAXParser();
parser->setDoNamespaces(true); // optional
DocumentHandler* docHandler = new HandlerBase();
ErrorHandler* errHandler = (ErrorHandler*) docHandler;
parser->setDocumentHandler(docHandler);
parser->setErrorHandler(errHandler);
parser->parse(xmlFile);
cout<<parser->getRootGrammar();
delete parser;
delete docHandler;
return 0;
}
at my out put i just saw an address i dont know what to do now? how to use this address ? what iit is pointing toward? what should i do to change the parameter of xml file my xml file is following
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>fs.default.name</name>
<value> name</value>
</property>
</configuration>
i just want to change "name" to "myname" in this file
can anybody tell me how to do this?