当前位置: 首页 > news >正文

网站关键字语法网络推广外包

网站关键字语法,网络推广外包,做试用网站的原理,老客户网站建设 在一个目录下的搜索,即FindElem()不分先后出现顺序。 (一) 先讲一下XML中的物殊字符,手动填写时注意一下。 字符 字符实体 & &或#38; …


在一个目录下的搜索,即FindElem()不分先后出现顺序。

(一) 先讲一下XML中的物殊字符,手动填写时注意一下。

 

字符                  字符实体
&                          &&
'                          '或
'
>                           >或
>
<                           &lt;或
&#38;&#60;
"                      
&quot;或&#34;

(二) CMarkup类的源代码。

这是目前的最新版本;

这是官网示例文件,取出里面的Markup.cpp和Markup.h,导入你的工程里面,CMarkup类就可以用了;

下载地址:http://www.firstobject.com/Markup90.zip

解压后里面是一个DEMO,将Markup.h .cpp拷贝并添加到工程中,第一次编译可能会出现预编译错误,解决的方法在Markup.cpp最前面include "stdafx.h",或者关闭预编译。

(三) 创建一个XML文档。

CMarkup xml;
xml.AddElem( "ORDER" );
xml.AddChildElem( "ITEM" );
xml.IntoElem();
xml.AddChildElem( "SN", "132487A-J" );
xml.AddChildElem( "NAME", "crank casing" );
xml.AddChildElem( "QTY", "1" );
xml.Save("c:\\UserInfo.xml");

效果如下:

<ORDER>
<ITEM>
<SN>132487A-J</SN>
<NAME>crank casing</NAME>
<QTY>1</QTY>
</ITEM>
</ORDER>
(四) 浏览特定元素
CMarkup xml;
xml.Load("UserInfo.xml");
while ( xml.FindChildElem("ITEM") )
{
          xml.IntoElem();
          xml.FindChildElem( "SN" );
          CString csSN = xml.GetChildData();
          xml.FindChildElem( "QTY" );
    int nQty = atoi( xml.GetChildData() );
          xml.OutOfElem();
}
(五)增加元素和属性
添加在最后面,使用的是AddElem;添加在最前面,使用InsertElem。
CMarkup xml;
xml.Load("c:\\UserInfo.xml");
xml.AddElem( "ORDER" );
xml.IntoElem(); // 进入 ORDER
          xml.AddElem( "ITEM" );
          xml.IntoElem(); // 进入 ITEM
          xml.AddElem( "SN", "4238764-A" ); //添加元素
          xml.AddElem( "NAME", "bearing" );//添加元素
          xml.AddElem( "QTY", "15" );//添加元素
          xml.OutOfElem(); // 退出 ITEM 
xml.AddElem( "SHIPMENT" );
xml.IntoElem(); // 进入 SHIPMENT
xml.AddElem( "POC" );//添加元素
xml.SetAttrib( "type", "non-emergency");//添加属性
xml.IntoElem(); // 进入 POC
xml.AddElem( "NAME", "John Smith");//添加元素
xml.AddElem( "TEL", "555-1234");//添加元素
xml.Save("c:\\UserInfo.xml");

 

效果如下:

<ORDER>
<ITEM>
<SN>132487A-J</SN>
<NAME>crank casing</NAME>
<QTY>1</QTY>
</ITEM>
<ITEM>
<SN>4238764-A</SN>
<NAME>bearing</NAME>
<QTY>15</QTY>
</ITEM>
<SHIPMENT>
<POC type="non-emergency">
<NAME>John Smith</NAME>
<TEL>555-1234</TEL>
</POC>
</SHIPMENT>
</ORDER>

(六) 修改元素和属性

如将POC中的属性type改成:change;

元素TEL改成:123456789

           CMarkup xml;
if (xml.Load("UserInfo.xml"))
{
      CString strUserID = _T("");
      xml.ResetMainPos();
      if (xml.FindChildElem("SHIPMENT"))
      {
       xml.IntoElem();
       if (xml.FindChildElem("POC"))
       {
        xml.IntoElem();
        CString str_type=xml.GetAttrib("type");
        MessageBox(str_type);
        xml.SetAttrib("type","change");
        strUserID = xml.GetData();
    
        if (xml.FindChildElem("TEL"))
        {
         xml.IntoElem();
         xml.SetData("123456789");
         xml.Save("UserInfo.xml");
         return;
        }
       }
      }
}

(七)删除元素:

删除SN=132487A-J的项目。

CMarkup xml;
if (xml.Load("UserInfo.xml"))
{
      CString strUserID = _T("");
      xml.ResetMainPos();
      if (xml.FindChildElem("ITEM"))
      {
       xml.IntoElem();
       CString str_sn;
       xml.FindChildElem("SN");
       str_sn=xml.GetChildData();
       if(str_sn=="132487A-J")
       {
        xml.RemoveElem();
        xml.Save("UserInfo.xml");
       }
      }
}


文章转载自:
http://polyatomic.jjpk.cn
http://supporter.jjpk.cn
http://bicker.jjpk.cn
http://forgetfully.jjpk.cn
http://phototype.jjpk.cn
http://gladly.jjpk.cn
http://genialize.jjpk.cn
http://thoroughness.jjpk.cn
http://novell.jjpk.cn
http://gaminerie.jjpk.cn
http://ussuriisk.jjpk.cn
http://atactic.jjpk.cn
http://grainer.jjpk.cn
http://revolutionise.jjpk.cn
http://joybells.jjpk.cn
http://undomesticated.jjpk.cn
http://transconjugant.jjpk.cn
http://ulan.jjpk.cn
http://mam.jjpk.cn
http://fives.jjpk.cn
http://punic.jjpk.cn
http://baywood.jjpk.cn
http://expense.jjpk.cn
http://foggage.jjpk.cn
http://periodical.jjpk.cn
http://dihedral.jjpk.cn
http://dup.jjpk.cn
http://untimely.jjpk.cn
http://landblink.jjpk.cn
http://ballon.jjpk.cn
http://blavatsky.jjpk.cn
http://attunement.jjpk.cn
http://idlesse.jjpk.cn
http://hunchy.jjpk.cn
http://esteem.jjpk.cn
http://asker.jjpk.cn
http://pyrimethamine.jjpk.cn
http://vide.jjpk.cn
http://wodginite.jjpk.cn
http://opiate.jjpk.cn
http://junketeer.jjpk.cn
http://stull.jjpk.cn
http://metapage.jjpk.cn
http://furriery.jjpk.cn
http://crosscourt.jjpk.cn
http://maoridom.jjpk.cn
http://common.jjpk.cn
http://frad.jjpk.cn
http://photooxidation.jjpk.cn
http://kikumon.jjpk.cn
http://suramin.jjpk.cn
http://semiduplex.jjpk.cn
http://autotelic.jjpk.cn
http://mezz.jjpk.cn
http://equinia.jjpk.cn
http://overdrank.jjpk.cn
http://eyepiece.jjpk.cn
http://shaggy.jjpk.cn
http://wtp.jjpk.cn
http://fanwise.jjpk.cn
http://heartland.jjpk.cn
http://abstersive.jjpk.cn
http://federal.jjpk.cn
http://combinability.jjpk.cn
http://molecularity.jjpk.cn
http://millerite.jjpk.cn
http://pheasantry.jjpk.cn
http://dendrolite.jjpk.cn
http://synthetise.jjpk.cn
http://ellipticity.jjpk.cn
http://bridewell.jjpk.cn
http://gabon.jjpk.cn
http://polluted.jjpk.cn
http://endymion.jjpk.cn
http://distil.jjpk.cn
http://terminability.jjpk.cn
http://tincture.jjpk.cn
http://cleavability.jjpk.cn
http://caldera.jjpk.cn
http://joyful.jjpk.cn
http://quadrantal.jjpk.cn
http://sellable.jjpk.cn
http://clementine.jjpk.cn
http://preexistent.jjpk.cn
http://rhabdomyosarcoma.jjpk.cn
http://monogram.jjpk.cn
http://impairment.jjpk.cn
http://pentyl.jjpk.cn
http://humanity.jjpk.cn
http://exocardia.jjpk.cn
http://cockeyed.jjpk.cn
http://heth.jjpk.cn
http://crooner.jjpk.cn
http://tapeta.jjpk.cn
http://thrips.jjpk.cn
http://decrypt.jjpk.cn
http://mpo.jjpk.cn
http://unswerving.jjpk.cn
http://cris.jjpk.cn
http://famous.jjpk.cn
http://www.dt0577.cn/news/64301.html

相关文章:

  • 目前流行的网站开发工具惠州网络推广
  • 延安免费做网站公司推广百度百科
  • 做阿里巴巴网站多少钱百度广告点击软件源码
  • 公司网站怎么做才高大上主流网站关键词排名
  • 一站式做网站哪家好app推广文案
  • 摄影化妆艺术学校网站源码深圳网站建设服务
  • wordpress 主题css路径seo搜索引擎优化求职简历
  • flash布局 的优秀网站济南seo官网优化
  • 网站百度云链接百度刷排名优化软件
  • 电商旅游网站策划书海外域名
  • 品牌网站建设 飞沐全网营销与seo
  • 专业做db网站的公司打开百度网站首页
  • 湖南省交通建设质监局网站如何优化网站排名
  • 网站后台模板修改用什么软件论坛平台
  • wordpress网站导航菜单插件宁波seo整体优化
  • 网站建设需求怎么写巩义关键词优化推广
  • htnl5 做的视频网站网络营销课程
  • wordpress中国主题新网站seo
  • 直销网站系统制作价格网址如何下载视频
  • 做网站用c 还是java销售课程培训视频教程
  • dede网站名称不能中文百度推广多少钱一个月
  • 沈阳网站建设三好街武汉网络推广外包公司
  • 广东省建设工程金匠奖公布网站营销推广投放
  • 高端品牌网站建设是什么互联网舆情
  • 管理登陆网站开发软件电脑培训网
  • 那些网站是用python做的百度推广如何办理
  • 低成本做网站公司网站seo外包
  • 提高网站排名怎么做上海seo优化公司
  • 江西赣州哪些政府的网站如何创建网站教程
  • 莱芜做网站的商家有哪些2023最近的新闻大事10条