YahooWidget@wiki

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

最終更新:

匿名ユーザー

- view
だれでも歓迎! 編集
私たちは今出発してください。

したがって、テキストエディターを持っていますね。私は、あなたが行うことを望みます!そうでなければ、1つつかみに行ったほうがよい、リンクの使用、の中で「行うもの、私は必要とします」セクション。マイクロソフトWordは十分ではありません!
Can we start now, please?
So, you have a text editor, right? I hope you do! If not, you'd better go grab one using the links in
the "What Do I Need" section. Microsoft Word will not suffice!

開く、Weather.widget/内容/選択のあなたの元の文エディターの中のWeather.kon。
Open The Weather.widget/Contents/The Weather.kon in your plain-text editor of
choice.

あなた方については、見ているファイルのシンタックスを認識するでしょう。テキストのケースはXMLにおいて重要です。したがって、それがそのような、天 候および小型装置の中で使用されるように、その場合を使用してください。あなた方については、速度まであなたを得ましょう。
For those of you who are familiar with HTML, you'll recognize the syntax of the file you're looking at.
Text case is important in XML, so please use the case as it is used in The Weather and Widgets like
it. For those of you who aren't so familiar, let's get you up to speed.

第一に、XML宣言であなたの小型装置を離れて始めることはよい考えです、まさに第1のライン。XML宣言は、それが読んでいるものが有効なXMLである とKonfabulatorに伝えます。また、さらに、それはKonfabulatorにXML明細バージョン、および使用するどんな符号化も伝えます。
First of all, it's a good idea to start your Widget off with an XML declaration the very first line. An
XML declaration tells Konfabulator that what it is reading is valid XML, and it also tells Konfabulator
the XML specification version and what encoding it uses.

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

指定するファイル符号化は実際のファイル符号化と一致するに違いありません。例えば、あなた のファイルが言う場合、「符号化=「UTF-8」。」あなたのテキストエディターはMacRomanにコード化されたファイルを編集しています。また、" °"あるいは「?」のような文字をタイプします、小型装置中の奇妙な特徴を得るでしょう。あるいは、さらにより悪く、小型装置は全くロードしないかもしれ ません。
The file encoding you specify must match the actual file encoding. For example, if your
file says 'encoding = "UTF-8"', your text editor is editing a MacRoman-encoded file,
and you type characters such as "°" or "©", you will get funny characters in your
Widget, or even worse, your Widget might not load at all.

使用する最良の符号化はUnicodeいくつかのものUTF-8あるいはUTF-16です。異なる符号化がどのように支援されるか確かめるためにテキスト エディター・ドキュメンテーションを調べてください。符号化が、あなたが望むものであることを確かめるかあるいは期待するために別の小型装置のテキストを コピーする場合は、それを思い出してください。
The best encodings to use
are Unicode ones UTF-8 or UTF-16. Consult your text editor documentation to see how
different encodings are supported. Remember that if you copy the text of another
Widget to make sure the encoding is what you want, or expect.


XML宣言以下に、他のいくつかのXMLタグを見つけるでしょう。あなたが気づけば、次のラインは小型装置コードが<小型装置>タグの使用を 通じてスタートしようとしているとKonfabulatorに伝えます。タグは帰着します、走るために小型装置が要求するとあなたに Konfabulatorの最小のバージョンの状態のようにKonfabulatorものに伝えさせる、そして小型装置がそれ自体であるどんなバージョ ン。
Below the XML declaration you will find some other XML tags. If you'll notice, the next line tells
Konfabulator that the Widget code is starting through the use of a <widget> tag. The tag attributes
let you tell Konfabulator things like what the minimum version of Konfabulator is that the Widget
requires to run and what version the Widget itself is.

さらに、.konファイルの一番端に、</widget>タグ(それはそのラインでは、それが小型装置のためのコードの端に到着したとKonfabulatorに伝える)があることに気づくでしょう。
You'll also notice that at the very end of
the .kon file, there is a </widget> tag, which tells Konfabulator that at that line it has reached the
end of the code for the Widget.

タグ:

+ タグ編集
  • タグ:

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

目安箱バナー