2014-01-11 5 views
-2

내가 XML 값은 그러나, 내 코드는 이러한 많은 charecters 중 하나를 포함하지 않는 & < >오류가

같은 특수 많은 charecters 작성을위한 특별한 코드를 가지고 있음을 알 수 있습니까 값.

<string name="scientists_descrption">(26 December 1791 18 October 1871) was an English polymath.He was a mathematician, philosopher, inventor and mechanical engineer, who is best remembered now for originating the concept of a programmable computer.\n Considered a "father of the computer", Babbage is credited with inventing the first mechanical computer that eventually led to more complex designs. His varied work in other fields has led him to be described as "pre-eminent" among the many polymaths of his century.\n Parts of Babbage's uncompleted mechanisms are on display in the London Science Museum. In 1991, a perfectly functioning difference engine was constructed from Babbage's original plans. Built to tolerances achievable in the 19th century, the success of the finished engine indicated that Babbage's machine would have worked.</string> 

하지만이 문자열에는 여전히 오류가 있습니다.

어떤 도움을 주시겠습니까?

+1

오류 메시지가 나타 납니까? 게시 해주세요. –

+0

무엇이 오류입니까? – Emmanuel

답변

1

'을 백 슬래시로 이스케이프 처리해야하므로 '의 모든 항목을 \'으로 바꿉니다.

<string name="scientists_descrption">(26 December 1791 18 October 1871) was an English polymath.He was a mathematician, philosopher, inventor and mechanical engineer, who is best remembered now for originating the concept of a programmable computer.\n Considered a "father of the computer", Babbage is credited with inventing the first mechanical computer that eventually led to more complex designs. His varied work in other fields has led him to be described as "pre-eminent" among the many polymaths of his century.\n Parts of Babbage\'s uncompleted mechanisms are on display in the London Science Museum. In 1991, a perfectly functioning difference engine was constructed from Babbage\'s original plans. Built to tolerances achievable in the 19th century, the success of the finished engine indicated that Babbage\'s machine would have worked.</string> 
+0

나는 그들을 모두 바꿨지 만 여전히 오류가있다 –

+0

정말 이상하다. Eclipse 및 ADT에서 확인했습니다. 게시물에 넣은 텍스트를 정확하게 붙여 넣으십시오. – PiotrK

0

string 안에 큰 따옴표를 역 슬래시하지 않았기 때문에 오류가 발생했습니다.

..."father of the computer"......\"father of the computer\"...이어야합니다.

작은 따옴표와 동일한 문제가있을 수 있습니다.