本文へ移動
QKQuickKitEN
データ形式LOCALブラウザ内で処理

XML ⇄ JSON 変換

上限付き・限定XML treeを、明示したJSON mappingへローカル変換します。

入力と主要な処理をブラウザ内で行い、その入力内容をQuickKitサーバーへ送信しない設計です。

変換結果

仕組みと使い方

attributeは@name、element textは#text、repeated elementはarrayで表します。child element間のformatting whitespaceは正規化し、leaf textの空白は保持します。XML 1.0のline endingとCDATA型attributeのliteral whitespaceを正規化し、JSON attributeの空白はround-trip用character referenceとして出力します。XML 1.0 Char production外のJSON値はrejectします。実mixed content、namespace、comment、processing instruction、CDATA、DTD、不正なXML Nameはrejectします。空arrayと@name・#textの非scalar値はrejectします。schema typeは保持しないためlosslessなround-tripではありません。