Configuring XML output attributes - attributeValueProcessor?
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- tooling
調査の方向性
まず XMLBuilder の設定と issue で言及されている attributeValueProcessor オプションを確認し、現在の動作を提示された JSON および期待される XML と比較します。type と id を属性として出力し、期待される構造に一致させるために必要な設定を特定または文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
Description
Not sure if this should be a feature request, or I am just not understanding the docs - How to I ensure that when I am using the XMLBuilder that XML attributes are correct? I have very strict requirements on the XML format, since it will need to be human writable. I know I will need to provide some additional config into the builder, as there is no way it can know that I want 'id' to be an attribute - I was looking at 'attributeValueProcessor' but there is no documentation how to use it, or I couldnt see it.
Input
Here is an example of the JSON
Code
{
"question": {
"ask": "Which of the following statements are true?",
"choice": [
{
"#text": "This one",
"id": "A"
},
{
"#text": "Probably this one",
"id": "B"
},
{
"#text": "Not this one",
"id": "C"
}
],
"answer": "A",
"response": [
{
"#text": "Sorry that is not right.",
"type": "incorrect"
},
{
"#text": "Well done!",
"type": "correct"
}
],
"type": "MC"
}
}
Output
<question>
<ask>
Which of the following statements are true?
</ask>
<choice>
This one.
<id>
A
</id>
</choice>
<choice>
Probably this one
<id>
B
</id>
</choice>
<choice>
Not this one.
<id>
C
</id>
</choice>
<answer>
A
</answer>
<response>
Sorry that is not right.
<type>
incorrect
</type>
</response>
<response>
Well done!
<type>
correct
</type>
</response>
<type>
MC
</type>
</question>
expected data
<question type="MC">
<ask>Which of the following statements are true?</ask>
<choice id="A">This one.</choice>
<choice id="B">Probably this one</choice>
<choice id="C">Not this one.</choice>
<answer>A</answer>
<response type="incorrect">Sorry that is not right.</response>
<response type="correct">Well done!</response>
</question>
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates.
- 主要言語
- JavaScript
- スター
- 22
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NaturalIntelligence/fast-xml-builder のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
`preserveOrder: true` with `format: true` formats mixed content wrongly and adds whitespace to content that ends with `>`対応中かも @neumaennl が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
`XMLBuilder` object should be exported as a named export, not just the type対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NaturalIntelligence/fast-xml-builder#25 · コメント 1 件 ·
-
sanitizeName not applied to names inside stopNodes (quote injection / tag break-out bypass)対応中かも @hicay が 5 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
NaturalIntelligence/fast-xml-builder#34 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
NaturalIntelligence/fast-xml-builder の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
Extended search drops any query term that contains a line break対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
area:mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信