2011-09-06 55 views
1

Xml有關於屬性長度的任何問題?XML錯誤格式(PHP)

當我在PHP中創建這個XML總是得到格式錯誤,這是正確的嗎?

<feed xmlns="http://74.53.32.202/~ltashiro/public/Servidor/" xml:lang="en-US"> 
<Row Id="1" Name="Any" Under="1016" Description="Pancetta beef ribs capicola ribeye, shankle leberkäse chicken fatback jerky shank ground round turkey turducken. Salami andouille chuck, pancetta tenderloin meatball frankfurter biltong. Jowl venison tri-tip pancetta meatloaf, swine frankfurter ball tip filet mignon salami tail boudin tenderloin kielbasa chuck. Tri-tip tail andouille, tongue chicken flank shankle corned beef salami t-bone meatloaf sausage meatball frankfurter. Prosciutto ham meatloaf, shoulder corned beef tenderloin rump venison ribeye kielbasa drumstick brisket pork chop pork loin. Short loin sirloin pastrami bresaola, pork chop pork belly turducken strip steak t-bone prosciutto meatloaf. Bresaola leberkäse short ribs, shankle frankfurter hamburger tongue." /> 
</feed> 
+0

Description屬性的值的長度在這裏不應該是個問題。偶然,它不是xml:lang屬性嗎?在使用它之前,您需要引用該名稱空間。不刪除xml:lang使錯誤消失? –

+0

發現錯誤是xml:lang兩個,但在文本中間有一些「迷失在那裏...... –

回答

0

嘗試將所有非ASCII字符轉換爲數字HTML實體。
例如「ä」變成「&#228;」