PHP getDocNamespaces() ပုံစံ

အသုံးပြုခြင်း နှင့် အသုံးပြုခြင်း

getDocNamespaces() ပရိုဂရမ် က SimpleXMLElement အပေါင်းစု အား မှတ်ချက် ဖြစ်သော XML ဖိုင် တွင် အမည်အသုံး ဖြစ်သော အမည်အသုံး များ ကို ပြန်ပေးသည်。

အောက်ပါ ပရိုဂရမ် က အောင်မြင်စွာ အပြန်ပေးသည်။ အောင်မြင်မှု မရှိဘဲ အောင်မြင်မှု မရှိပါ။

ဖော်ပြ

class SimpleXMLElement
{
string getDocNamespaces();recursive)
}
ပါဝင် ဖော်ပြ
recursive ဆိုင်ရာ။ ပါဝင်သော အမည်အသုံး များ နှင့် တကွ ပါဝင်သော အမည်အသုံး များ ကို ပါဝင်စေရန် ကို သတ်မှတ်ပါ။ လျှပ်ပေး အချိန် မရှိ၏။

ဌာန

XML ဖိုင်

<?xml version="1.0" encoding="ISO-8859-1"?>
<note xmlns:b="http://www.codew3c.com/example/">
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<b:body>Don't forget the meeting!</b:body>
</note>

PHP ကိုးကား

<?php
if (file_exists('test.xml');
  {
  $xml = simplexml_load_file('test.xml');
  }
print_r();$xml->getDocNamespaces(););
?>

ထွက်သွား သို့မဟုတ်

Array
(
[b] => http://www.codew3c.com/example/
)