Ⅰ 如何用c語言實現對xml文件的加密
把xml就當做一個普通的二進制文件
然後隨便找一個加密演算法
按照位元組讀入xml文件
然後按照加密演算法進行加密轉換,輸出到目標文件就可以了
簡單的 可以用異或方式。
Ⅱ C#里使用XML有什麼好處
1)XML可以用於本地計算的數據。傳遞到桌面的數據可以進行本地計算。XML解析器可以讀取數據,並將它遞交給本地應用程序(例如瀏覽器)進一步查看或處理。數據也可以由使用XML對象模型的腳本或其它編程語言來處理。
2)可以為用戶提供正確的結構化數據視圖。傳遞到桌面的數據可以以多種方式表示。本地數據集,可以根據用戶喜好和配置等因素,以適當的形式在視圖中動態表現給用戶。
3)允許集成不同來源的結構化數據。使用代理可在中間層伺服器上集成來自後端資料庫和其它應用程序的數據,使該數據能夠傳遞給桌面或者其它伺服器,做進一步處理。
4)描述來自多種應用程序的數據。由於 XML 是可擴展的,因此它可以用於描述來自多種應用程序的數據,即使沒有數據的內置描述,也能夠接收和處理數據。
5)通過粒度更新來提高性能。XML 允許粒度更新。開發人員不必在每次改動時都發送整個結構化數據集。有了粒度更新後,只有改變的元素才從伺服器發送到客戶機。
Ⅲ 請問怎麼用C解析XML文件
你可以從網上下載相應版本的XML應用庫,然後,編譯程序時,調用其中的函數進行XML文件解析。
如果是簡單的XML文件,或只是進行少量的數據存取,也可以自己寫相應的取值、賦值函數進行數據操作。
Ⅳ 如何用shell腳本修改XML文件
通過shell腳本修改xml文件中的某行記錄
跟之前一樣,假設有如下的xml文件:
web.xml中有如下內容:
[html] view plain
cookieName
sessionName
需求:現在需要利用shell腳本替換掉cookieName對應的value值,
利用shell實現方式如下:
shell腳本部分:
declare -i Dline
getline()
{
grep -n "cookieName" ${DOMAIN_HOME}/portal/ROOT/WEB-INF/web.xml | head -1 |
cut -d ":" -f 1;
}
getlinenum()
{
awk "BEGIN{a=`getline`;b="1";c=(a+b);print c}";
}
Dline=`getlinenum`;
echo "line is ${Dline}";
sed -i "${Dline},${Dline}s/.*/ \替換的value值\<\/param-value\>/g"
path/web.xml
說明:這個跟之前的替換屬性文件的區別在於,這個是精確定位到行的,然後替換正行code。
這個xml和properties 中都是默認需要替換的內容是唯一的。
Ⅳ 怎麼用C語言寫一個簡單的XML文件
用VC吧,下面有一個例子,你參照下:
voidCreateXml()
{
CoInitialize(NULL);
//創建文檔
MSXML2::IXMLDOMDocument2PtrpXMLDoc=NULL;
//創建DOMDocument對象
HRESULThr=pXMLDoc.CreateInstance(__uuidof(MSXML2::DOMDocument));
if(!SUCCEEDED(hr))
{
return;
}
//
MSXML2::=NULL;
pXMLProc=pXMLDoc->createProcessingInstruction("xml","version='1.0'encoding='UTF-8'");
_variant_tvNullVal;
vNullVal.vt=VT_NULL;
pXMLDoc->insertBefore(pXMLProc,vNullVal);
//創建根結點
_variant_tvarNodeType((short)MSXML2::NODE_ELEMENT);
MSXML2::IXMLDOMNodePtrpXMLNodeRoot=NULL;
pXMLNodeRoot=pXMLDoc->createNode(varNodeType,_T("Cases"),_T(""));
//添加根結點
pXMLDoc->appendChild(pXMLNodeRoot);
//創建並添加下級結點
MSXML2::IXMLDOMNodePtrpXMLNodeNode=NULL;
pXMLNodeNode=pXMLNodeRoot->appendChild(pXMLDoc->createElement(_T("Case")));
//創建下級元素結點
MSXML2::IXMLDOMElementPtrpXMLEle=NULL;
pXMLEle=pXMLDoc->createElement(_T("CopyFile"));
//創建並設置下級結點屬性
MSXML2::IXMLDOMAttributePtrpXMLAttr=NULL;
pXMLAttr=pXMLDoc->createAttribute(_T("src"));
pXMLAttr->nodeTypedValue="C:\test.txt";
pXMLEle->attributes->setNamedItem(pXMLAttr);
pXMLAttr=pXMLDoc->createAttribute(_T("dest"));
pXMLAttr->nodeTypedValue="D:\Test.txt";
pXMLEle->attributes->setNamedItem(pXMLAttr);
//添加元素結點
pXMLNodeNode->appendChild(pXMLEle);
MSXML2::IXMLDOMElementPtrpXMLEle1=NULL;
pXMLEle1=pXMLDoc->createElement(_T("DelFile"));
pXMLEle1->appendChild(pXMLDoc->createTextNode("C:\test.txt"));
//添加元素結點
pXMLNodeNode->appendChild(pXMLEle1);
//保存文檔
pXMLDoc->save(_T("d:\Test.xml"));
}
效果如下:
<?xmlversion="1.0"encoding="UTF-8"?>
<Cases>
<Case>
<CopyFilesrc="C: est.txt"dest="D:Test.txt"/>
<DelFile>C: est.txt</DelFile>
</Case>
</Cases>
為了能夠讓MFC認識MSXML2,我們需要引入相應的dll,代碼如下;
#import "msxml4.dll"
Ⅵ 用C語言讀取xml文件,怎麼實現
我上次才給人寫過
xml文件內容
<?xmlversion="1.0"encoding="UTF-8"?>
-<aicomoa_response>
-<country_list>
-<country>
<id>7</id>
<pid>0</pid>
<continent_id>1</continent_id>
<guohao>93</guohao>
<cntitle>阿富汗</cntitle>
<entitle>Afghanistan</entitle>
<hztitle>阿富汗</hztitle>
<jptitle>アフガニスタン</jptitle>
<kotitle>??????</kotitle>
<jp_pinyin>ア</jp_pinyin>
<pinyin>AFuHan</pinyin>
<sid>0</sid>
<jibie>1</jibie>
</country>
-<country>
<id>8</id>
<pid>0</pid>
<continent_id>2</continent_id>
<guohao>355</guohao>
<cntitle>阿爾巴尼亞</cntitle>
<entitle>Albania</entitle>
<hztitle>阿爾巴尼亞</hztitle>
<jptitle>アルバニア</jptitle>
<kotitle/>
<jp_pinyin>ア</jp_pinyin>
<pinyin>AErBaNiYa</pinyin>
<sid>0</sid>
<jibie>1</jibie>
</country>
</country_list>
</aicomoa_response>
運行結果
Info[0]=[id:7|pid:0|continent_id:1|guohao:93|cntitle:阿富汗|entitle:Afghanistan|
hztitle:阿富汗|jptitle:アフガニスタン|kotitle:??????|jp_pinyin:ア|pinyin:AFuHan|
sid:0|jibie:1|]
Info[1]=[id:7|pid:0|continent_id:1|guohao:93|cntitle:阿富汗|entitle:Afghanistan|
hztitle:阿富汗|jptitle:アフガニスタン|kotitle:??????|jp_pinyin:ア|pinyin:AFuHan|
sid:0|jibie:1|]
Pressanykeytocontinue
代碼
#include<stdio.h>
#include<string.h>
main()
{
inti=0;
FILE*fp;
charszFileBuff[1024]={0},szBuff[100][1024];
charid[10]={0},pid[10]={0},continent_id[10]={0},guohao[10]={0},
cntitle[64]={0},entitle[64]={0},hztitle[64]={0},jptitle[64]={0},
kotitle[64]={0},jp_pinyin[64]={0},pinyin[64]={0},sid[10]={0},jibie[10]={0};
char*lFirst,*lEnd;
fp=fopen("country.txt","r");
if(fp==NULL)
{
printf("readXMLfileerror! ");
}
while(fgets(szFileBuff,1023,fp))
{
if((lFirst=strstr(szFileBuff,"<id>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</id>");
memcpy(id,lFirst+4,lEnd-lFirst-4);
}
if((lFirst=strstr(szFileBuff,"<pid>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</pid>");
memcpy(pid,lFirst+5,lEnd-lFirst-5);
}
if((lFirst=strstr(szFileBuff,"<continent_id>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</continent_id>");
memcpy(continent_id,lFirst+14,lEnd-lFirst-14);
}
if((lFirst=strstr(szFileBuff,"<guohao>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</guohao>");
memcpy(guohao,lFirst+8,lEnd-lFirst-8);
}
if((lFirst=strstr(szFileBuff,"<cntitle>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</cntitle>");
memcpy(cntitle,lFirst+9,lEnd-lFirst-9);
}
if((lFirst=strstr(szFileBuff,"<entitle>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</entitle>");
memcpy(entitle,lFirst+9,lEnd-lFirst-9);
}
if((lFirst=strstr(szFileBuff,"<hztitle>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</hztitle>");
memcpy(hztitle,lFirst+9,lEnd-lFirst-9);
}
if((lFirst=strstr(szFileBuff,"<jptitle>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</jptitle>");
memcpy(jptitle,lFirst+9,lEnd-lFirst-9);
}
if((lFirst=strstr(szFileBuff,"<kotitle>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</kotitle>");
memcpy(kotitle,lFirst+9,lEnd-lFirst-9);
}
if((lFirst=strstr(szFileBuff,"<jp_pinyin>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</jp_pinyin>");
memcpy(jp_pinyin,lFirst+11,lEnd-lFirst-11);
}
if((lFirst=strstr(szFileBuff,"<pinyin>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</pinyin>");
memcpy(pinyin,lFirst+8,lEnd-lFirst-8);
}
if((lFirst=strstr(szFileBuff,"<sid>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</sid>");
memcpy(sid,lFirst+5,lEnd-lFirst-5);
}
if((lFirst=strstr(szFileBuff,"<jibie>"))!=NULL)
{
lEnd=strstr(lFirst+1,"</jibie>");
memcpy(jibie,lFirst+7,lEnd-lFirst-7);
}
if((lFirst=strstr(szFileBuff,"</country>"))!=NULL)
{
sprintf(szBuff[i],"id:%s|pid:%s|continent_id:%s|guohao:%s|cntitle:%s|entitle:%s|hztitle:%s|jptitle:%s|kotitle:%s|jp_pinyin:%s|pinyin:%s|sid:%s|jibie:%s|",
id,pid,continent_id,guohao,cntitle,entitle,hztitle,jptitle,kotitle,jp_pinyin,pinyin,sid,jibie);
printf("Info[%d]=[%s] ",i++,szBuff);
}
}
fclose(fp);
}
Ⅶ 如何在C 實現自定義XML序列化問題,怎麼解決
對於字元串,你有一些選擇;xml可以簡單地用 XmlSerializer ( 或者 DataContractSerializer,但它提供了對xml的更少控制) 或者 JSON (JSON.net, 等來完成。
XmlSerializer的典型類看起來很簡單:
public class Apple {
public string Variety {get;set;}
public decimal Weight {get;set;}//etc}
( 注意我也希望上面的Json.NET 也能工作)
上面的類還應該在數據綁定場景中工作良好,這是由於。
你將序列化:
Apple obj = new Apple { Variety ="Cox", Weight = 12.1M};
XmlSerializer ser = new XmlSerializer(typeof(Apple));
StringWriter sw = new StringWriter();
ser.Serialize(sw, obj);
string xml = sw.ToString();
StringReader sr = new StringReader(xml);
Apple obj2 = (Apple)ser.Deserialize(sr);
但是你可以自定義 xml:
[XmlType("apple"), XmlRoot("apple")]public class Apple {
[XmlAttribute("variety")]
public string Variety {get;set;}
[XmlAttribute("weight")]
public decimal Weight {get;set;}//etc}
DataContractSerializer 是最理想的,更喜歡:
[DataContract]public class Apple {
[DataMember]
public string Variety {get;set;}
[DataMember]
public decimal Weight {get;set;}}
Ⅷ c語言如何調用xml的介面函數
/***************
<?xmlversion="1.0"encoding="utf-8"?>
<Cases>
<case>
<No>001</No>
<CopyFilesrc="C: est.txt"dest="D: est.txt"></CopyFile>
</case>
<case>
<No>002</No>
<DelFile>C: est.txt</DelFile>
</case>
</Cases>
*******************/
//我們用MFC來讀取上述xml,代碼如下:
voidReadXml(CStringstrXmlPath)
{
MSXML2::IXMLDOMDocumentPtrpDoc;
::CoInitialize(NULL);
HRESULThr=pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40));
if(!SUCCEEDED(hr))
{
MessageBox(_T("創建DOMDocument對象失敗。 請檢查運行環境"),_T("錯誤"),MB_ICONERROR);
return;
}
//讀取xml
pDoc->put_async(VARIANT_FALSE);
VARIANT_BOOLbhr=pDoc->load((_variant_t)strXmlPath);
if(bhr!=VARIANT_TRUE){
MessageBox(_T("無法正確讀取xml文件"),_T("錯誤"),MB_ICONERROR);
return;
}
//根節點取得
MSXML2::IXMLDOMElementPtrroot=pDoc->documentElement;
//取得根節點的名字
_variant_tstrRootName=root->nodeName;
_bstr_twstrRootName(strRootName.bstrVal);
MSXML2::IXMLDOMNodeListPtrnodeList=root->GetchildNodes();//cases
//解析cases的子節點
ReadCases(nodeList);
}
voidReadCases(MSXML2::IXMLDOMNodeListPtrnodeList)
{
intilength=nodeList->Getlength();
for(intnodeCount=0;nodeCount<ilength;nodeCount++){
MSXML2::IXMLDOMNodePtrnodePtr=nodeList->nextNode();
_variant_tstrNodeName=nodePtr->GetnodeName();
_variant_tstrNodeValue=nodePtr->GetnodeValue();
//讀取case節點下的子節點
ReadCase(nodePtr->GetchildNodes());
}
}
voidReadCase(MSXML2::IXMLDOMNodeListPtrnodeList)
{
CStringstrLogInfo;
strLogInfo.Empty();
CStringstrNo;//case編號
CStringstrSrcFile;//源文件
CStringstrDestFile;//目標文件
for(intnodeCount=0;nodeCount<nodeList->Getlength();nodeCount++)
{
MSXML2::IXMLDOMNodePtrnodePtr=nodeList->nextNode();
_variant_tstrCaseNodeName=nodePtr->GetnodeName();
_variant_tstrCaseNodeValue=nodePtr->Gettext();
BSTRbStrTemp=strCaseNodeName.bstrVal;
CStringstrTemp=CString(bStrTemp);
SysFreeString(bStrTemp);
CStringstrNodeName=strTemp;
//節點的值,如何取得?
if(0==strNodeName.CompareNoCase(_T("NO")))
{
strNo=(BSTR)strCaseNodeValue.pbstrVal;
//取得的值可以列印出來
printf(strNo);
}
//節點有屬性值,該怎麼處理?
elseif(0==strNodeName.CompareNoCase(_T("CopyFile")))
{
strSrcFile.Empty();
strDestFile.Empty();
//取得節點的屬性值
MSXML2::=nodePtr->Getattributes();
for(intj=0;j<pDOMAttrList->Getlength();j++)
{
MSXML2::IXMLDOMNodePtrpDOMAttr=pDOMAttrList->Getitem(j);
//取得源文件路徑
if(CompareNoCase((char*)pDOMAttr->GetnodeName(),_T("src")))
{
strSrcFile=pDOMAttr->GetnodeTypedValue();
//取得目標文件路徑
}elseif(CompareNoCase((char*)pDOMAttr->GetnodeName(),_T("dest")))
{
strDestFile=pDOMAttr->GetnodeTypedValue();
}
CopyFile(strSrcFile,strDestFile,FALSE);
}
elseif(0==strNodeName.CompareNoCase(_T("DelFile")))
{
strDestFile.Empty();
strDestFile=CString((BSTR)strCaseNodeValue.pbstrVal);
DeleteFile(strDestFile);
}
}
}
//為了能夠讓MFC認識MSXML2,我們需要引入相應的dll,代碼如下;
#import"msxml4.dll"
Ⅸ 怎麼用c語言解析xml文件
我上次才給人寫過
xml文件內容
<?xml version="1.0" encoding="UTF-8" ?>
- <aicomoa_response>
- <country_list>
- <country>
<id>7</id>
<pid>0</pid>
<continent_id>1</continent_id>
<guohao>93</guohao>
<cntitle>阿富汗</cntitle>
<entitle>Afghanistan</entitle>
<hztitle>阿富汗</hztitle>
<jptitle>アフガニスタン</jptitle>
<kotitle>??????</kotitle>
<jp_pinyin>ア</jp_pinyin>
<pinyin>AFuHan</pinyin>
<sid>0</sid>
<jibie>1</jibie>
</country>
- <country>
<id>8</id>
<pid>0</pid>
<continent_id>2</continent_id>
<guohao>355</guohao>
<cntitle>阿爾巴尼亞</cntitle>
<entitle>Albania</entitle>
<hztitle>阿爾巴尼亞</hztitle>
<jptitle>アルバニア</jptitle>
<kotitle />
<jp_pinyin>ア</jp_pinyin>
<pinyin>AErBaNiYa</pinyin>
<sid>0</sid>
<jibie>1</jibie>
</country>
</country_list>
</aicomoa_response>
運行結果
Info[0]=[id:7|pid:0|continent_id:1|guohao:93|cntitle:阿富汗|entitle:Afghanistan|
hztitle:阿富汗|jptitle:アフガニスタン|kotitle:??????|jp_pinyin:ア|pinyin:AFuHan|
sid:0|jibie:1|]
Info[1]=[id:7|pid:0|continent_id:1|guohao:93|cntitle:阿富汗|entitle:Afghanistan|
hztitle:阿富汗|jptitle:アフガニスタン|kotitle:??????|jp_pinyin:ア|pinyin:AFuHan|
sid:0|jibie:1|]
Press any key to continue
代碼
#include <stdio.h>
#include <string.h>
main()
{
int i=0;
FILE *fp;
char szFileBuff[1024] = {0}, szBuff[100][1024];
char id[10] = {0}, pid[10] = {0}, continent_id[10] = {0}, guohao[10] = {0},
cntitle[64]= {0},entitle[64]= {0},hztitle[64] = {0},jptitle[64] = {0},
kotitle[64] = {0},jp_pinyin[64] = {0}, pinyin[64] = {0},sid[10] = {0},jibie[10] = {0};
char *lFirst, *lEnd;
fp = fopen("country.txt","r");
if (fp==NULL)
{
printf("read XML file error!\n");
}
while(fgets(szFileBuff, 1023, fp))
{
if ((lFirst = strstr(szFileBuff, "<id>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</id>");
memcpy(id, lFirst + 4, lEnd - lFirst - 4);
}
if ((lFirst = strstr(szFileBuff, "<pid>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</pid>");
memcpy(pid, lFirst + 5, lEnd - lFirst - 5);
}
if ((lFirst = strstr(szFileBuff, "<continent_id>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</continent_id>");
memcpy(continent_id, lFirst + 14, lEnd - lFirst - 14);
}
if ((lFirst = strstr(szFileBuff, "<guohao>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</guohao>");
memcpy(guohao, lFirst + 8, lEnd - lFirst - 8);
}
if ((lFirst = strstr(szFileBuff, "<cntitle>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</cntitle>");
memcpy(cntitle, lFirst + 9, lEnd - lFirst - 9);
}
if ((lFirst = strstr(szFileBuff, "<entitle>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</entitle>");
memcpy(entitle, lFirst + 9, lEnd - lFirst - 9);
}
if ((lFirst = strstr(szFileBuff, "<hztitle>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</hztitle>");
memcpy(hztitle, lFirst + 9, lEnd - lFirst - 9);
}
if ((lFirst = strstr(szFileBuff, "<jptitle>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</jptitle>");
memcpy(jptitle, lFirst + 9, lEnd - lFirst - 9);
}
if ((lFirst = strstr(szFileBuff, "<kotitle>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</kotitle>");
memcpy(kotitle, lFirst + 9, lEnd - lFirst - 9);
}
if ((lFirst = strstr(szFileBuff, "<jp_pinyin>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</jp_pinyin>");
memcpy(jp_pinyin, lFirst + 11, lEnd - lFirst - 11);
}
if ((lFirst = strstr(szFileBuff, "<pinyin>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</pinyin>");
memcpy(pinyin, lFirst + 8, lEnd - lFirst - 8);
}
if ((lFirst = strstr(szFileBuff, "<sid>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</sid>");
memcpy(sid, lFirst + 5, lEnd - lFirst - 5);
}
if ((lFirst = strstr(szFileBuff, "<jibie>")) != NULL)
{
lEnd = strstr(lFirst + 1, "</jibie>");
memcpy(jibie, lFirst + 7, lEnd - lFirst - 7);
}
if ((lFirst = strstr(szFileBuff, "</country>")) != NULL)
{
sprintf(szBuff[i],"id:%s|pid:%s|continent_id:%s|guohao:%s|cntitle:%s|entitle:%s|hztitle:%s|jptitle:%s|kotitle:%s|jp_pinyin:%s|pinyin:%s|sid:%s|jibie:%s|",
id,pid,continent_id,guohao,cntitle,entitle,hztitle,jptitle,kotitle,jp_pinyin, pinyin,sid,jibie);
printf("Info[%d]=[%s]\n",i++, szBuff);
}
}
fclose(fp);
}
補充:你這個就說得太籠統了,
1 你上傳的xml文件具體格式是什麼?
2 要在網頁上顯示的具體格式是什麼
3 你根本不知道怎麼做 所以也不知道怎麼問
我不用關心你的c語言的cgi吧?我才不管是用什麼上傳的
只有你說的嵌入式三個字 給我一點有用信息 就是解析這個xml用插件恐怕是不行
只能C語言
4 我現在只要求你的xml文件格式和 網頁上要顯示哪些xml中解析出來的信息
只要知道這些 我只需要在我的程序上加上生成html文件就行了
Ⅹ c語言如何解析xml並將所有內容存入數組
/*前段時間恰好做過類似的東西,代碼可以給你參考下。
*Xml配置見最後
*/
typedefstructSrcFileFmt
{
intColID;
charColCode[64];/*欄位英文名稱*/
charColName[128];/*欄位中文名稱*/
charColType[20];/*欄位類型(包含長度)*/
charColComment[128];/*欄位描述*/
}SrcFileFmt;
intmain(intargc,char**argv)
{
SrcFileFmtSrcFileFmt[128];
intiNum=-1;
if(2>argc)
{
printf("Usage:%sSrcXmlFile ",argv[0]);
return-1;
}
iNum=parseSourceCfg(SrcCfgFile,SrcFileFmt);
if(iNum==-1)
{
return-1;
}
return0;
}
/*調用此函數後,xml文件的內容會被存儲到結構體數組SrcFileFmtsrcfilefmt[]中
*此函數依賴於libxml2-2.9.2.tar.xz
*/
intparseSourceCfg(char*FileName,SrcFileFmtsrcfilefmt[])
{/*解析源文件xml,FileName為源xml文件名*/
xmlDocPtrdoc;
xmlNodePtrcur,root;
charsFileName[64]={'