奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

php語言

php修改增加xml結點屬性的代碼

時間:2024-07-19 07:06:09 php語言 我要投稿
  • 相關推薦

php修改增加xml結點屬性的代碼

  php修改xml結點屬性,增加xml結點屬性的代碼,有需要的朋友,參考下。就跟隨百分網小編一起去了解下吧,想了解更多相關信息請持續關注我們應屆畢業生考試網!

  1、xml文件

  復制代碼 代碼示例:

  <?xml version="1.0" encoding="UTF-8" ?>

  <clientSet>

  <server url="192.168.0.180" port="1935" />

  <rootPath value="" />

  <homePath value="http://www.aaa.com" />

  <helpPath value="help.html" />

  <language value="en" />

  <theme value="default" />

  <visibleMarquee value = "true" />

  <visibleWhitePaper value="true" />

  <showMemberRoomForGuest value = "true" />

  <emotions enabled="true" column="5" autoPlay="false">

  <item name="Birthday" src="cartoon/movie/birthday.swf" thumb="cartoon/preview/birthday-small.swf" duration="15"/>

  <item name="Boom" src="cartoon/movie/boom.swf" thumb="cartoon/preview/boom-small.swf" duration="6"/>

  <item name="Bubble" src="cartoon/movie/bubble.swf" thumb="cartoon/preview/bubble-small.swf" duration="7.5"/>

  <item name="Cry" src="cartoon/movie/cry.swf" thumb="cartoon/preview/cry-small.swf" duration="5.4"/>

  <item name="Doggie" src="cartoon/movie/doggie.swf" thumb="cartoon/preview/doggie-small.swf" duration="13"/>

  <item name="Greeting" src="cartoon/movie/greeting.swf" thumb="cartoon/preview/greeting-small.swf" duration="7.4"/>

  <item name="Football" src="cartoon/movie/football.swf" thumb="cartoon/preview/football-small.swf" duration="2.2"/>

  </emotions >

  </clientSet>

  2、php代碼

  復制代碼 代碼示例:

  <?

  $dom=new DOMDocument('1.0');

  $dom->load('x.xml');

  $em=$dom->getElementsByTagName('emotions');

  $em=$em->item(0);

  $items=$em->getElementsByTagName('item');

  foreach($items as $a){

  foreach($a->attributes as $b){

  if($b->nodeValue=='Birthday'){

  $a->setAttribute('name','nBirthday');

  }

  }

  }

  $t=$dom->createElement('item');

  $t->setAttribute('name','x');

  $t->setAttribute('src','www.sohu.com');

  $t->setAttribute('duration','duration');

  $em->appendChild($t);

  $dom->save('x.xml');

  ?>

【php修改增加xml結點屬性的代碼】相關文章:

php解析XML文檔屬性并編輯的代碼09-28

php語言字典代碼06-08

怎么修改php后綴09-30

php動態生成JavaScript代碼10-03

php下載代碼怎么寫07-13

PHP源代碼方式詳解08-08

用PHP與XML聯手進行網站編程10-16

20條PHP代碼優化技巧05-06

php連接mysql數據庫代碼08-01

PHP實現大文件上傳源代碼10-21

主站蜘蛛池模板: 阜新市| 湖南省| 泰来县| 丹凤县| 酒泉市| 菏泽市| 浦江县| 五华县| 自治县| 台北市| 崇文区| 长宁区| 高碑店市| 武宁县| 永顺县| 玉林市| 新晃| 桃园市| 黔西县| 筠连县| 綦江县| 楚雄市| 四川省| 雅江县| 永丰县| 满洲里市| 馆陶县| 敦煌市| 南丰县| 黄大仙区| 钟山县| 密山市| 石屏县| 肇源县| 中西区| 梁平县| 灵石县| 合阳县| 冷水江市| 沽源县| 修文县|