2
次のテキストをXML属性に保存する正しい方法は何ですか?特定の文字のみをUTF-8 XMLでエスケープする必要がありますか?
テキスト:
", à,é,è, <
出力1(すべてエスケープ)
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>test</title>
</head>
<body>
<outline text="element" _note="", à,é,è, <">
</outline>
</body>
</opml>
出力2(only XML specific charactersエスケープ)
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>test</title>
</head>
<body>
<outline text="element" _note="", à,é,è, <">
</outline>
</body>
</opml>
は、これらの両方が有効か?