質問するログイン新規登録

質問編集履歴

2

試したことのコードの修正(半角スペースの削除とencodingの変更)

2018/06/20 04:44

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -46,7 +46,7 @@
46
46
  今度は出力内容が異なり、以下のエラー文が出てしまいました。
47
47
  同じxmlでも参考記事の例とどのように異なり、修正する必要があるのでしょうか。
48
48
  ```xml
49
- <?xml version="1.0" encoding='iso-2022-jp'?>
49
+ <?xml version="1.0" encoding="UTF-8"?>
50
50
  <cafe>
51
51
  <name>カフェ</name>
52
52
  <place>東京</place>
@@ -63,10 +63,20 @@
63
63
  ```
64
64
  エラー文
65
65
  ```
66
- This page contains the following errors:
67
- error on line 1 at column 7: XML declaration allowed only at the start of the document
66
+ This XML file does not appear to have any style information associated with it. The document tree is shown below.
67
+ <cafe>
68
+ <name>カフェ</name>
69
+ <place>東京</place>
70
+ <menu>
68
- Below is a rendering of the page up to the first error.
71
+ <item price="150">コーヒー</item>
72
+ <item price="180">オレンジジュース</item>
73
+ <item price="200">ココア</item>
74
+ </menu>
75
+ <open from="10:00" to="22:00"/>
76
+ <misc> オフィス近くの便利なカフェ. </misc>
77
+ </cafe>
69
78
  ```
70
79
 
71
80
  ### 補足情報(FW/ツールのバージョンなど)
81
+ Mac OS High Sierra
72
82
  Google Chrome バージョン: 67.0.3396.87(Official Build)

1

エラー文に関する記述の修正

2018/06/20 04:44

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -9,7 +9,7 @@
9
9
  その記述の確かさを確認するのでしょうか。
10
10
 
11
11
  以下、ローカルにファイルを置いてChromeで実行した場合に出力されたものです。
12
- このように出力されればxmlファイル記述は正常なのでしょうか。
12
+ このように出力されましたが、どのように修正すればいいのでしょうか。
13
13
  ```
14
14
  This XML file does not appear to have any style information associated with it. The document tree is shown below.
15
15
  <在庫データ>