YahooWidget@wiki

チュートリアル:XMLの概要-2

最終更新:

匿名ユーザー

- view
だれでも歓迎! 編集
<widget version="1.6.7" minimumVersion="1.7">
    [...]
</widget>
XMLタグには必ずそれを閉じるためのタグが必要で(その特定の要素がそこでパースをとめてよいことを示す)。例えば、<image>タグがあれば、対応する</image>タグを使用してそれを閉めなければならない。
また、下記のようにタグは入れ子にすることができます。(そしてこれはHTMLとXMLの場合は必須です。):
An XML tag always has a partner whichcloses it (thusly telling the parserto stop
reading code for that particular element).For example, if you have an<image> tag,
you must close it using a corresponding</image> tag. You can nest tagsas well (and
this is required in the case of both HTMLand XML), like so:

<widget>
  <image>
    <src>Images/My Great Image.png</src>
    <hOffset>74</hOffset>
    <opacity>85%</opacity>
  </image>
</widget>

別の方法としては、属性をタグの中に記載し、/>タグで閉じる方法もあります。
Alternately, you can identify most of yourattributes using this format,and end the tag
with />:

<widget>
  <image
    src="Images/My Great Image.png"
    hOffset="74"
    opacity="85%"
  />
</widget>

またこれらの表記を使い分けることもできます(しかしこの場合は"/"を使用してはいけない):
You can also mix and match (but don't use"/>" in this case):

<widget>
  <image src="Images/My Great Image.png">
    <hOffset>74</hOffset>
    <opacity>85%</opacity>
  </image>
</widget>

とにかく、製作する上で大切なポイントは、あなたが書いたタグが、正しく開始され、正しく閉じられているかということです。
そうすればあなたのWidgetを動作させたときに、不可解の結果を得ることはないでしょう!
もし、正しくない場所に文字列やタグが存在していると、Widget Engine(konfabulator)は混乱するでしょう。コンピューターは気難しいものです。
Anyway, the point we're trying to make isthat you make sure all youropening tags are
closed correctly (and spelled correctly onboth the opening and closing tagswhen
applicable) so you don't get weird errorswhen you try to run your Widget! Ifyou have
one letter out of place or mistyped in atag, Konfabulator will get confused.These
computers are so darnpicky!

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

目安箱バナー