예제 #1
0
bool c_XMLWriter::t_writeelement(CStrRef name,
                                 CStrRef content /* = null_string */) {
  INSTANCE_METHOD_INJECTION_BUILTIN(XMLWriter, XMLWriter::writeelement);
  if (xmlValidateName((xmlChar*)name.data(), 0)) {
    raise_warning("invalid element name: %s", name.data());
    return false;
  }
  int ret = -1;
  if (m_ptr) {
    if (content.isNull()) {
      ret = xmlTextWriterStartElement(m_ptr, (xmlChar*)name.data());
      if (ret == -1) return false;
      ret = xmlTextWriterEndElement(m_ptr);
      if (ret == -1) return false;
    } else {
      ret = xmlTextWriterWriteElement(m_ptr, (xmlChar*)name.data(),
                                      (xmlChar*)content.data());
    }
  }
  return ret != -1;
}
예제 #2
0
void PnlFmncNavLabbook::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncNavLabbook";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncNavLabbook";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Electronic labbook module");
			writeStringAttr(wr, itemtag, "sref", "CptStp", "recipes");
			writeStringAttr(wr, itemtag, "sref", "CptPrj", "projects");
			writeStringAttr(wr, itemtag, "sref", "CptRun", "runs");
			writeStringAttr(wr, itemtag, "sref", "CptAct", "activities");
			writeStringAttr(wr, itemtag, "sref", "CptSep", "steps");
			writeStringAttr(wr, itemtag, "sref", "CptSmp", "samples");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Elektronisches Laborbuch");
			writeStringAttr(wr, itemtag, "sref", "CptStp", "Rezepte");
			writeStringAttr(wr, itemtag, "sref", "CptPrj", "Projekte");
			writeStringAttr(wr, itemtag, "sref", "CptRun", "L\\u00e4ufe");
			writeStringAttr(wr, itemtag, "sref", "CptAct", "Aktivit\\u00e4ten");
			writeStringAttr(wr, itemtag, "sref", "CptSep", "Schritte");
			writeStringAttr(wr, itemtag, "sref", "CptSmp", "Samples");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Partie cahier \\u00e9lectronique");
			writeStringAttr(wr, itemtag, "sref", "CptStp", "recettes");
			writeStringAttr(wr, itemtag, "sref", "CptPrj", "projets");
			writeStringAttr(wr, itemtag, "sref", "CptRun", "d\\u00e9roulements");
			writeStringAttr(wr, itemtag, "sref", "CptAct", "activit\\u00e9s");
			writeStringAttr(wr, itemtag, "sref", "CptSep", "\\u00e9tapes");
			writeStringAttr(wr, itemtag, "sref", "CptSmp", "\\u00e9chantillons");
		};
	xmlTextWriterEndElement(wr);
};
예제 #3
0
void PnlFmncTolRec::StatApp::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
			, const bool initdoneDetail
			, const bool initdoneKSteppar
			, const bool initdoneKToolchar
			, const bool initdoneAAvl
			, const bool initdoneAChar
			, const bool initdoneARes
			, const bool initdoneAUtil
			, const bool initdone1NArticle
			, const bool initdoneRlv1NStep
			, const bool initdoneRef1NFile
			, const bool initdoneMNTooltype
			, const bool initdoneMNFabuser
			, const bool initdoneSvcMNOrg
		) {
	if (difftag.length() == 0) difftag = "StatAppFmncTolRec";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StatitemAppFmncTolRec";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeBoolAttr(wr, itemtag, "sref", "initdoneDetail", initdoneDetail);
		writeBoolAttr(wr, itemtag, "sref", "initdoneKSteppar", initdoneKSteppar);
		writeBoolAttr(wr, itemtag, "sref", "initdoneKToolchar", initdoneKToolchar);
		writeBoolAttr(wr, itemtag, "sref", "initdoneAAvl", initdoneAAvl);
		writeBoolAttr(wr, itemtag, "sref", "initdoneAChar", initdoneAChar);
		writeBoolAttr(wr, itemtag, "sref", "initdoneARes", initdoneARes);
		writeBoolAttr(wr, itemtag, "sref", "initdoneAUtil", initdoneAUtil);
		writeBoolAttr(wr, itemtag, "sref", "initdone1NArticle", initdone1NArticle);
		writeBoolAttr(wr, itemtag, "sref", "initdoneRlv1NStep", initdoneRlv1NStep);
		writeBoolAttr(wr, itemtag, "sref", "initdoneRef1NFile", initdoneRef1NFile);
		writeBoolAttr(wr, itemtag, "sref", "initdoneMNTooltype", initdoneMNTooltype);
		writeBoolAttr(wr, itemtag, "sref", "initdoneMNFabuser", initdoneMNFabuser);
		writeBoolAttr(wr, itemtag, "sref", "initdoneSvcMNOrg", initdoneSvcMNOrg);
	xmlTextWriterEndElement(wr);
};
예제 #4
0
void PnlFmncNavLabbook::StatApp::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
			, const uint ixFmncVExpstate
			, const bool LstStpAlt
			, const bool LstPrjAlt
			, const bool LstRunAlt
			, const bool LstActAlt
			, const bool LstSepAlt
			, const bool LstSmpAlt
			, const uint LstStpNumFirstdisp
			, const uint LstPrjNumFirstdisp
			, const uint LstRunNumFirstdisp
			, const uint LstActNumFirstdisp
			, const uint LstSepNumFirstdisp
			, const uint LstSmpNumFirstdisp
		) {
	if (difftag.length() == 0) difftag = "StatAppFmncNavLabbook";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StatitemAppFmncNavLabbook";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeStringAttr(wr, itemtag, "sref", "srefIxFmncVExpstate", VecFmncVExpstate::getSref(ixFmncVExpstate));
		writeBoolAttr(wr, itemtag, "sref", "LstStpAlt", LstStpAlt);
		writeBoolAttr(wr, itemtag, "sref", "LstPrjAlt", LstPrjAlt);
		writeBoolAttr(wr, itemtag, "sref", "LstRunAlt", LstRunAlt);
		writeBoolAttr(wr, itemtag, "sref", "LstActAlt", LstActAlt);
		writeBoolAttr(wr, itemtag, "sref", "LstSepAlt", LstSepAlt);
		writeBoolAttr(wr, itemtag, "sref", "LstSmpAlt", LstSmpAlt);
		writeUintAttr(wr, itemtag, "sref", "LstStpNumFirstdisp", LstStpNumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "LstPrjNumFirstdisp", LstPrjNumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "LstRunNumFirstdisp", LstRunNumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "LstActNumFirstdisp", LstActNumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "LstSepNumFirstdisp", LstSepNumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "LstSmpNumFirstdisp", LstSmpNumFirstdisp);
	xmlTextWriterEndElement(wr);
};
예제 #5
0
void PnlFmncArtList::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncArtList";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncArtList";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Articles");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Reference");
			writeStringAttr(wr, itemtag, "sref", "TcoTit", "Name");
			writeStringAttr(wr, itemtag, "sref", "TcoOrg", "Manufacturer");
			writeStringAttr(wr, itemtag, "sref", "TcoTol", "Tool");
			writeStringAttr(wr, itemtag, "sref", "TcoTyp", "Type");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Artikel");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Referenz");
			writeStringAttr(wr, itemtag, "sref", "TcoTit", "Name");
			writeStringAttr(wr, itemtag, "sref", "TcoOrg", "Hersteller");
			writeStringAttr(wr, itemtag, "sref", "TcoTol", "Ger\\u00e4t");
			writeStringAttr(wr, itemtag, "sref", "TcoTyp", "Typ");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Articles");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "R\\u00e9f\\u00e9rence");
			writeStringAttr(wr, itemtag, "sref", "TcoTit", "Nom");
			writeStringAttr(wr, itemtag, "sref", "TcoOrg", "Fournisseur");
			writeStringAttr(wr, itemtag, "sref", "TcoTol", "\\u00e9quipement");
			writeStringAttr(wr, itemtag, "sref", "TcoTyp", "Type");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::GOTO, ixFmncVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::SHOWLONG, ixFmncVLocale)));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::EMPLONG, ixFmncVLocale)));
	xmlTextWriterEndElement(wr);
};
예제 #6
0
void PnlFmncSmpList::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncSmpList";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncSmpList";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Samples");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Identifier");
			writeStringAttr(wr, itemtag, "sref", "TcoSup", "Parent");
			writeStringAttr(wr, itemtag, "sref", "TcoArt", "Article");
			writeStringAttr(wr, itemtag, "sref", "TcoMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "TcoSte", "State");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Samples");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Bezeichner");
			writeStringAttr(wr, itemtag, "sref", "TcoSup", "Urpsrung");
			writeStringAttr(wr, itemtag, "sref", "TcoArt", "Artikel");
			writeStringAttr(wr, itemtag, "sref", "TcoMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "TcoSte", "Status");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "\\u00e9chantillons");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Identifiant");
			writeStringAttr(wr, itemtag, "sref", "TcoSup", "Origin");
			writeStringAttr(wr, itemtag, "sref", "TcoArt", "Article");
			writeStringAttr(wr, itemtag, "sref", "TcoMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "TcoSte", "\\u00e9tat");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::GOTO, ixFmncVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::SHOWLONG, ixFmncVLocale)));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::EMPLONG, ixFmncVLocale)));
	xmlTextWriterEndElement(wr);
};
예제 #7
0
void PnlFmncTolRec::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncTolRec";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncTolRec";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Tool");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Ger\\u00e4t");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "\\u00e9quipement");
		};
	xmlTextWriterEndElement(wr);
};
예제 #8
0
void PnlFmncNavLabbook::DpchEngData::writeXML(
			const uint ixFmncVLocale
			, pthread_mutex_t* mScr
			, map<ubigint,string>& scr
			, map<string,ubigint>& descr
			, xmlTextWriter* wr
		) {
	xmlTextWriterStartElement(wr, BAD_CAST "DpchEngFmncNavLabbookData");
	xmlTextWriterWriteAttribute(wr, BAD_CAST "xmlns", BAD_CAST "http://www.epsitechnologies.com/fmnc");
		if (has(JREF)) writeString(wr, "scrJref", Scr::scramble(mScr, scr, descr, jref));
		if (has(CONTIAC)) contiac.writeXML(wr);
		if (has(FEEDFLSTACT)) feedFLstAct.writeXML(wr);
		if (has(FEEDFLSTPRJ)) feedFLstPrj.writeXML(wr);
		if (has(FEEDFLSTRUN)) feedFLstRun.writeXML(wr);
		if (has(FEEDFLSTSEP)) feedFLstSep.writeXML(wr);
		if (has(FEEDFLSTSMP)) feedFLstSmp.writeXML(wr);
		if (has(FEEDFLSTSTP)) feedFLstStp.writeXML(wr);
		if (has(STATAPP)) StatApp::writeXML(wr);
		if (has(STATSHR)) statshr.writeXML(wr);
		if (has(TAG)) Tag::writeXML(ixFmncVLocale, wr);
	xmlTextWriterEndElement(wr);
};
예제 #9
0
void PnlPlnrCtpKCalcvar::DpchEngData::writeXML(
			const uint ixPlnrVLocale
			, pthread_mutex_t* mScr
			, map<ubigint,string>& scr
			, map<string,ubigint>& descr
			, xmlTextWriter* wr
		) {
	xmlTextWriterStartElement(wr, BAD_CAST "DpchEngPlnrCtpKCalcvarData");
	xmlTextWriterWriteAttribute(wr, BAD_CAST "xmlns", BAD_CAST "http://www.epsitechnologies.com/plnr");
		if (has(JREF)) writeString(wr, "scrJref", Scr::scramble(mScr, scr, descr, jref));
		if (has(CONTINF)) continf.writeXML(wr);
		if (has(FEEDFCSIQST)) feedFCsiQst.writeXML(wr);
		if (has(STATAPP)) StatApp::writeXML(wr);
		if (has(STATSHR)) statshr.writeXML(wr);
		if (has(STGIAC)) stgiac.writeXML(wr);
		if (has(TAG)) Tag::writeXML(ixPlnrVLocale, wr);
		if (has(RST)) rst.writeXML(wr);
		if (has(STATAPPQRY)) QryPlnrCtpKCalcvar::StatApp::writeXML(wr);
		if (has(STATSHRQRY)) statshrqry.writeXML(wr);
		if (has(STGIACQRY)) stgiacqry.writeXML(wr);
	xmlTextWriterEndElement(wr);
};
예제 #10
0
void QryPlnrDtpList::StatApp::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
			, const uint firstcol
			, const uint jnumFirstdisp
			, const uint ncol
			, const uint ndisp
		) {
	if (difftag.length() == 0) difftag = "StatAppQryPlnrDtpList";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StatitemAppQryPlnrDtpList";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeUintAttr(wr, itemtag, "sref", "firstcol", firstcol);
		writeUintAttr(wr, itemtag, "sref", "jnumFirstdisp", jnumFirstdisp);
		writeUintAttr(wr, itemtag, "sref", "ncol", ncol);
		writeUintAttr(wr, itemtag, "sref", "ndisp", ndisp);
	xmlTextWriterEndElement(wr);
};
예제 #11
0
void CrdPlnrClc::Tag::writeXML(
			const uint ixPlnrVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagPlnrClc";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemPlnrClc";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixPlnrVLocale == VecPlnrVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "MitCrdUcs", "Run use case ...");
			writeStringAttr(wr, itemtag, "sref", "MitCrdGpv", "Generate result data plot or video ...");
			writeStringAttr(wr, itemtag, "sref", "MitCrdEtx", "Export result data as text ...");
		};
		writeStringAttr(wr, itemtag, "sref", "MitAppAbt", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::ABOUT, ixPlnrVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "MrlAppHlp", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::HELP, ixPlnrVLocale)) + " ...");
	xmlTextWriterEndElement(wr);
};
예제 #12
0
static int qgs_write_colorramps(xmlTextWriter *writer, qgs_t *qgs)
{
  if (xmlTextWriterStartElement(writer, BAD_CAST "colorramps") < 0 )
    {
      btrace("error from open colorramps");
      return 1;
    }

  if (qgs_write_colorramp(writer, qgs) != 0)
    {
      btrace("failed to write colorramp");
      return 1;
    }

  if (xmlTextWriterEndElement(writer) < 0)
    {
      btrace("error from close colorramps");
      return 1;
    }

  return 0;
}
axis2_status_t AXIS2_CALL
axis2_libxml2_writer_wrapper_write_start_element(
    axiom_xml_writer_t * writer,
    const axutil_env_t * env,
    axis2_char_t * localname)
{
    int status = 0;
    axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL;
    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
    AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
    writer_impl = AXIS2_INTF_TO_IMPL(writer);

    writer_impl->in_start_element = AXIS2_TRUE;

    status = xmlTextWriterStartElement(writer_impl->xml_writer, (xmlChar *)localname);
    if(status < 0)
    {
        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_WRITING_START_ELEMENT, AXIS2_FAILURE);
        return AXIS2_FAILURE;
    }
    return AXIS2_SUCCESS;
}
예제 #14
0
/**
 * Export VirtualBox machines
 */
void exportVirtualBoxMachines(IVirtualBox *virtualBox, xmlTextWriterPtr writer) {
	IMachine **machines = NULL;
	PRUint32 machinesCount = 0;
	nsresult rc = virtualBox->GetMachines(&machinesCount, &machines);

	if (NS_SUCCEEDED(rc)) {
		xmlTextWriterStartElement(writer, TOXMLCHAR("machines"));

			for (PRUint32 i = 0; i < machinesCount; i++) {
				PRBool accessible = PR_FALSE;

				rc = machines[i]->GetAccessible(&accessible);
				if (NS_SUCCEEDED(rc) && accessible) {
					exportVirtualBoxMachine(virtualBox, machines[i], writer);
				}
			}

		xmlTextWriterEndElement(writer);

		NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(machinesCount, machines);
	}
}
예제 #15
0
void CrdPlnrFil::StatShr::writeXML(
			pthread_mutex_t* mScr
			, map<ubigint,string>& scr
			, map<string,ubigint>& descr
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "StatShrPlnrFil";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StatitemShrPlnrFil";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeStringAttr(wr, itemtag, "sref", "scrJrefDlgdldcpy", Scr::scramble(mScr, scr, descr, jrefDlgdldcpy));
		writeStringAttr(wr, itemtag, "sref", "scrJrefHeadbar", Scr::scramble(mScr, scr, descr, jrefHeadbar));
		writeStringAttr(wr, itemtag, "sref", "scrJrefList", Scr::scramble(mScr, scr, descr, jrefList));
		writeStringAttr(wr, itemtag, "sref", "scrJrefRec", Scr::scramble(mScr, scr, descr, jrefRec));
		writeBoolAttr(wr, itemtag, "sref", "MitCrdDcyActive", MitCrdDcyActive);
	xmlTextWriterEndElement(wr);
};
예제 #16
0
void PnlPlnrLyrRec::StatApp::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
			, const bool initdoneDetail
			, const bool initdone1NBlock
			, const bool initdone1NReticle
			, const bool initdoneMNStructure
		) {
	if (difftag.length() == 0) difftag = "StatAppPlnrLyrRec";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StatitemAppPlnrLyrRec";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeBoolAttr(wr, itemtag, "sref", "initdoneDetail", initdoneDetail);
		writeBoolAttr(wr, itemtag, "sref", "initdone1NBlock", initdone1NBlock);
		writeBoolAttr(wr, itemtag, "sref", "initdone1NReticle", initdone1NReticle);
		writeBoolAttr(wr, itemtag, "sref", "initdoneMNStructure", initdoneMNStructure);
	xmlTextWriterEndElement(wr);
};
예제 #17
0
void PnlPlnrDvcSup1NDevice::Tag::writeXML(
			const uint ixPlnrVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagPlnrDvcSup1NDevice";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemPlnrDvcSup1NDevice";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixPlnrVLocale == VecPlnrVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Sub-devices");
			writeStringAttr(wr, itemtag, "sref", "TcoRef", "Device");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::GOTO, ixPlnrVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", VecPlnrVTag::getTitle(VecPlnrVTag::SHOWSHORT, ixPlnrVLocale));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", VecPlnrVTag::getTitle(VecPlnrVTag::EMPSHORT, ixPlnrVLocale));
	xmlTextWriterEndElement(wr);
};
예제 #18
0
void PnlPlnrTpoDetail::ContIac::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "ContIacPlnrTpoDetail";

	string itemtag;
	if (shorttags) itemtag = "Ci";
	else itemtag = "ContitemIacPlnrTpoDetail";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeStringAttr(wr, itemtag, "sref", "TxfTit", TxfTit);
		writeUintAttr(wr, itemtag, "sref", "numFPupTyp", numFPupTyp);
		writeStringAttr(wr, itemtag, "sref", "TxfMaj", TxfMaj);
		writeStringAttr(wr, itemtag, "sref", "TxfSub", TxfSub);
		writeUintAttr(wr, itemtag, "sref", "numFPupJ", numFPupJ);
		writeUintAttr(wr, itemtag, "sref", "numFPupSte", numFPupSte);
		writeBoolAttr(wr, itemtag, "sref", "ChkFli", ChkFli);
		writeStringAttr(wr, itemtag, "sref", "TxfCmt", TxfCmt);
	xmlTextWriterEndElement(wr);
};
예제 #19
0
파일: DFXML.c 프로젝트: flyonok/DocFormats
static void writeElement(Serialization *serialization, DFNode *element, int depth)
{
    const TagDecl *tagDecl = DFNameMapNameForTag(serialization->doc->map,element->tag);
    assert(tagDecl != NULL);
    const NamespaceDecl *nsDecl = DFNameMapNamespaceForID(serialization->doc->map,tagDecl->namespaceID);
    assert(nsDecl != NULL);

    const xmlChar *prefix = (const xmlChar *)nsDecl->prefix;
    const xmlChar *localName = (const xmlChar *)tagDecl->localName;

    if (serialization->indent && (element->parent != element->doc->docNode))
        xmlTextWriterWriteRawLen(serialization->writer,INDENT,1+depth);

    if (serialization->html || (tagDecl->namespaceID == serialization->defaultNS))
        xmlTextWriterStartElement(serialization->writer,localName);
    else
        xmlTextWriterStartElementNS(serialization->writer,prefix,localName,NULL);

    if ((element->parent == serialization->doc->docNode) && !serialization->html)
        writeNamespaceDeclarations(serialization,element);

    writeAttributes(serialization,element);

    for (DFNode *child = element->first; child != NULL; child = child->next)
        writeNode(serialization,child,depth+2);

    if (serialization->indent && (element->first != NULL)) {
        if ((element->first != element->last) ||
            (element->first->tag != DOM_TEXT))
        xmlTextWriterWriteRawLen(serialization->writer,INDENT,1+depth);
    }

    if (serialization->html && (element->first == NULL) && HTML_requiresCloseTag(element->tag)) {
        xmlTextWriterWriteString(serialization->writer,(xmlChar *)"");
    }

    xmlTextWriterEndElement(serialization->writer);
}
예제 #20
0
void PnlFmncSmpDetail::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncSmpDetail";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncSmpDetail";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "CptSrf", "identifier");
			writeStringAttr(wr, itemtag, "sref", "CptSup", "parent sample");
			writeStringAttr(wr, itemtag, "sref", "CptArt", "article");
			writeStringAttr(wr, itemtag, "sref", "CptMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "CptSte", "state");
			writeStringAttr(wr, itemtag, "sref", "CptCmt", "comment");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "CptSrf", "Bezeichner");
			writeStringAttr(wr, itemtag, "sref", "CptSup", "urspr\\u00dcngliches Sample");
			writeStringAttr(wr, itemtag, "sref", "CptArt", "Artikel");
			writeStringAttr(wr, itemtag, "sref", "CptMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "CptSte", "Status");
			writeStringAttr(wr, itemtag, "sref", "CptCmt", "Notiz");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "CptSrf", "identifiant");
			writeStringAttr(wr, itemtag, "sref", "CptSup", "\\u00e9chantillon originaire");
			writeStringAttr(wr, itemtag, "sref", "CptArt", "article");
			writeStringAttr(wr, itemtag, "sref", "CptMat", "Material");
			writeStringAttr(wr, itemtag, "sref", "CptSte", "\\u00e9tat");
			writeStringAttr(wr, itemtag, "sref", "CptCmt", "remarque");
		};
		writeStringAttr(wr, itemtag, "sref", "Cpt", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::DETAIL, ixFmncVLocale)));
	xmlTextWriterEndElement(wr);
};
예제 #21
0
static int qgs_write_midstops(xmlTextWriter *writer, qgs_t *qgs)
{
  int n = qgs->n;

  if (n < 3) return 0;

  if (xmlTextWriterStartElement(writer, BAD_CAST "prop") < 0 )
    {
      btrace("error from open prop");
      return 1;
    }

  if (qgs_attribute(writer, "k", "stops", "prop") != 0)
    return 1;

  char *str;

  if ((str = mid_stops_string(qgs)) == NULL)
    return 1;

  int err = 0;

  if (qgs_attribute(writer, "v", str, "prop") != 0)
    {
      btrace("error writing attribute");
      err++;
    }

  free(str);

  if (xmlTextWriterEndElement(writer) < 0)
    {
      btrace("error from close prop");
      err++;
    }

  return err > 0;
}
예제 #22
0
void FmncQFusMNTool::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool jnumattr
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "FmncQFusMNTool";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
	if (jnumattr) xmlTextWriterWriteAttribute(wr, BAD_CAST "jnum", BAD_CAST to_string(jnum).c_str());
	if (shorttags) {
		writeString(wr, "mref", stubMref);
		writeString(wr, "trn", stubTrnRefFmncMPerson);
		writeString(wr, "lvl", srefKLvl);
		writeString(wr, "lvl2", titSrefKLvl);
	} else {
		writeString(wr, "stubMref", stubMref);
		writeString(wr, "stubTrnRefFmncMPerson", stubTrnRefFmncMPerson);
		writeString(wr, "srefKLvl", srefKLvl);
		writeString(wr, "titSrefKLvl", titSrefKLvl);
	};
	xmlTextWriterEndElement(wr);
};
static bool saveArchiveResource(xmlTextWriterPtr writer, PassRefPtr<ArchiveResource> resource)
{
    int result = xmlTextWriterStartElement(writer, archiveResourceTag);
    if (result < 0) {
        LOGD("saveArchiveResource: Failed to start element.");
        return false;
    }

    if (!saveArchiveResourceField(writer, urlFieldTag, resource->url().string())
        || !saveArchiveResourceField(writer, mimeFieldTag, resource->mimeType())
        || !saveArchiveResourceField(writer, encodingFieldTag, resource->textEncoding())
        || !saveArchiveResourceField(writer, frameFieldTag, resource->frameName())
        || !saveArchiveResourceField(writer, dataFieldTag, resource->data()))
        return false;

    result = xmlTextWriterEndElement(writer);
    if (result < 0) {
        LOGD("saveArchiveResource: Failed to end element.");
        return false;
    }

    return true;
}
예제 #24
0
void PlnrQDtpAPar::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool jnumattr
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "PlnrQDtpAPar";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
	if (jnumattr) xmlTextWriterWriteAttribute(wr, BAD_CAST "jnum", BAD_CAST to_string(jnum).c_str());
	if (shorttags) {
		writeString(wr, "key", x2SrefKKey);
		writeString(wr, "key2", titX2SrefKKey);
		writeString(wr, "fil", stubRefPlnrMFile);
		writeString(wr, "val", Val);
	} else {
		writeString(wr, "x2SrefKKey", x2SrefKKey);
		writeString(wr, "titX2SrefKKey", titX2SrefKKey);
		writeString(wr, "stubRefPlnrMFile", stubRefPlnrMFile);
		writeString(wr, "Val", Val);
	};
	xmlTextWriterEndElement(wr);
};
예제 #25
0
void PlnrQUsgAAccess::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool jnumattr
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "PlnrQUsgAAccess";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
	if (jnumattr) xmlTextWriterWriteAttribute(wr, BAD_CAST "jnum", BAD_CAST to_string(jnum).c_str());
	if (shorttags) {
		writeString(wr, "crd", srefX1IxPlnrVCard);
		writeString(wr, "crd2", titX1IxPlnrVCard);
		writeString(wr, "uac", srefsIxPlnrWUiaccess);
		writeString(wr, "uac2", titsIxPlnrWUiaccess);
	} else {
		writeString(wr, "srefX1IxPlnrVCard", srefX1IxPlnrVCard);
		writeString(wr, "titX1IxPlnrVCard", titX1IxPlnrVCard);
		writeString(wr, "srefsIxPlnrWUiaccess", srefsIxPlnrWUiaccess);
		writeString(wr, "titsIxPlnrWUiaccess", titsIxPlnrWUiaccess);
	};
	xmlTextWriterEndElement(wr);
};
예제 #26
0
void PnlPlnrClcAEnv::Tag::writeXML(
			const uint ixPlnrVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagPlnrClcAEnv";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemPlnrClcAEnv";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixPlnrVLocale == VecPlnrVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Environment");
			writeStringAttr(wr, itemtag, "sref", "TcoKey", "Environment variable key");
			writeStringAttr(wr, itemtag, "sref", "TcoVal", "Value");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::GOTO, ixPlnrVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", VecPlnrVTag::getTitle(VecPlnrVTag::SHOWSHORT, ixPlnrVLocale));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", VecPlnrVTag::getTitle(VecPlnrVTag::EMPSHORT, ixPlnrVLocale));
	xmlTextWriterEndElement(wr);
};
예제 #27
0
void FmncQPrsList::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool jnumattr
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "FmncQPrsList";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
	if (jnumattr) xmlTextWriterWriteAttribute(wr, BAD_CAST "jnum", BAD_CAST to_string(jnum).c_str());
	if (shorttags) {
		writeString(wr, "tit", Title);
		writeString(wr, "fnm", Firstname);
		writeString(wr, "lnm", Lastname);
		writeString(wr, "grp", stubGrp);
		writeString(wr, "own", stubOwn);
		writeString(wr, "org", stubRefFmncMOrg);
		writeString(wr, "adr", stubRefFmncMAddress);
		writeString(wr, "sex", srefIxVSex);
		writeString(wr, "sex2", titIxVSex);
		writeString(wr, "tel", Tel);
		writeString(wr, "eml", Eml);
	} else {
		writeString(wr, "Title", Title);
		writeString(wr, "Firstname", Firstname);
		writeString(wr, "Lastname", Lastname);
		writeString(wr, "stubGrp", stubGrp);
		writeString(wr, "stubOwn", stubOwn);
		writeString(wr, "stubRefFmncMOrg", stubRefFmncMOrg);
		writeString(wr, "stubRefFmncMAddress", stubRefFmncMAddress);
		writeString(wr, "srefIxVSex", srefIxVSex);
		writeString(wr, "titIxVSex", titIxVSex);
		writeString(wr, "Tel", Tel);
		writeString(wr, "Eml", Eml);
	};
	xmlTextWriterEndElement(wr);
};
예제 #28
0
void PnlFmncSepAPar::Tag::writeXML(
			const uint ixFmncVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagFmncSepAPar";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemFmncSepAPar";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixFmncVLocale == VecFmncVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Parameters");
			writeStringAttr(wr, itemtag, "sref", "TcoSpa", "Parameter");
			writeStringAttr(wr, itemtag, "sref", "TcoReu", "Relevance");
			writeStringAttr(wr, itemtag, "sref", "TcoVal", "Value");
			writeStringAttr(wr, itemtag, "sref", "TcoCmt", "Comment");
		} else if (ixFmncVLocale == VecFmncVLocale::DECH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Parameter");
			writeStringAttr(wr, itemtag, "sref", "TcoSpa", "Parameter");
			writeStringAttr(wr, itemtag, "sref", "TcoReu", "Relevanz");
			writeStringAttr(wr, itemtag, "sref", "TcoVal", "Wert");
			writeStringAttr(wr, itemtag, "sref", "TcoCmt", "Notiz");
		} else if (ixFmncVLocale == VecFmncVLocale::FRCH) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Param\\u00e8tres");
			writeStringAttr(wr, itemtag, "sref", "TcoSpa", "Param\\u00e8tre");
			writeStringAttr(wr, itemtag, "sref", "TcoReu", "R\\u00e9l\\u00e9vance");
			writeStringAttr(wr, itemtag, "sref", "TcoVal", "Valeur");
			writeStringAttr(wr, itemtag, "sref", "TcoCmt", "Remarque");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecFmncVTag::getTitle(VecFmncVTag::GOTO, ixFmncVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", VecFmncVTag::getTitle(VecFmncVTag::SHOWSHORT, ixFmncVLocale));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", VecFmncVTag::getTitle(VecFmncVTag::EMPSHORT, ixFmncVLocale));
	xmlTextWriterEndElement(wr);
};
예제 #29
0
void PnlPlnrAriList::StgIac::writeXML(
			xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "StgIacPlnrAriList";

	string itemtag;
	if (shorttags) itemtag = "Si";
	else itemtag = "StgitemIacPlnrAriList";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		writeUintAttr(wr, itemtag, "sref", "TcoIWidth", TcoIWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoJWidth", TcoJWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoKWidth", TcoKWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoLWidth", TcoLWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoMWidth", TcoMWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoNWidth", TcoNWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoArrWidth", TcoArrWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoDsnWidth", TcoDsnWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoDxWidth", TcoDxWidth);
		writeUintAttr(wr, itemtag, "sref", "TcoDyWidth", TcoDyWidth);
	xmlTextWriterEndElement(wr);
};
예제 #30
0
void PnlPlnrDtpKParKey::Tag::writeXML(
			const uint ixPlnrVLocale
			, xmlTextWriter* wr
			, string difftag
			, bool shorttags
		) {
	if (difftag.length() == 0) difftag = "TagPlnrDtpKParKey";

	string itemtag;
	if (shorttags) itemtag = "Ti";
	else itemtag = "TagitemPlnrDtpKParKey";

	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
		if (ixPlnrVLocale == VecPlnrVLocale::ENUS) {
			writeStringAttr(wr, itemtag, "sref", "Cpt", "Parameter keys");
			writeStringAttr(wr, itemtag, "sref", "TcoSrf", "Identifier");
			writeStringAttr(wr, itemtag, "sref", "TcoTit", "Name");
			writeStringAttr(wr, itemtag, "sref", "TcoCmt", "Comment");
		};
		writeStringAttr(wr, itemtag, "sref", "Trs", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::GOTO, ixPlnrVLocale)) + " ...");
		writeStringAttr(wr, itemtag, "sref", "TxtShowing1", VecPlnrVTag::getTitle(VecPlnrVTag::SHOWSHORT, ixPlnrVLocale));
		writeStringAttr(wr, itemtag, "sref", "TxtShowing2", VecPlnrVTag::getTitle(VecPlnrVTag::EMPSHORT, ixPlnrVLocale));
	xmlTextWriterEndElement(wr);
};