[xsd-users] How to get a schema location path from existing xml file
Mark Erlich
mark_erlich at hotmail.com
Mon Jan 4 04:39:09 EST 2010
Hi,I'm a new user of xsd and have been using it just for a few weeks.Application I'm writing should read a xml file and in certain conditionsit should create a new xml file, where the schema is same as inprevious file. My problem starts when I'm trying to serialize my newxml file: I can't get path for a schema out of the existing xml file!Is there any way to get this parameter when parsing a file?
source for this section:---------------------------std::auto_ptr< ::Configuration > conf( configuration (DEFAULT_CONF_LOC, xml_schema::Flags::dont_initialize));Configuration::OcspSequence ocspSeq;Configuration::ParamSequence paramSeq;paramSeq.push_back(newParam);conf->ocsp(ocspSeq); //replace all ocsp data with empty ocsp sequenceconf->param(paramSeq); //replace all param data with new modified param sequence
std::ofstream ofs;ofs.open(USER_CONF_LOC.c_str());xml_schema::NamespaceInfomap map;map[""].name = "";map[""].schema = getConfXsdPath().c_str(); //<--- Here is the problem. //I want to get schema path //from DEFAULT_CONF_LOC //file.configuration(ofs, *conf, map);ofs.close();---------------------------
With Best Regards,-Mark-
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010
More information about the xsd-users
mailing list