지금은 사용자가 요청한 파일을 간단히 다시 작성하여 데이터를 저장합니다. 내 XML은 구조화하는 방법은 다음과 같이이다 :TinyXML로 문서 수정
Skeleons root
Skeleton with string name attribute
bone with attributes
bone with attributes
bone with attributes
bone with attributes
end Skeleton
Skeleton with string name attribute
bone with attributes
bone with attributes
bone with attributes
bone with attributes
end Skeleton
....
end Skeletons root
내가 원하는 이름의 골격이 존재하는지 통해 반복하고 않는 경우 내가 완전히 다시 작성합니다. 그렇지 않은 경우 루트 요소의 맨 아래에 추가하고 싶습니다.
누구든지이 예제가 있습니까?
감사
두 경우 모두 "뼈"를 추가 하시겠습니까? 아니면 기존 뼈를 수정하고 싶을 수도 있습니까? – MSalters
@ MSalters Nope 기존의 Bone을 수정하고 싶지 않다. 만약 skeleton이 존재한다면 그것을 덮어 쓴다. 그렇지 않으면 root의 끝에 새로운 것을 만든다. – jmasterx