Game Development Reference
In-Depth Information
Figure 9.2. Visual Studio can edit .dae documents.
9.4 Editing a COLLADA Document
Now that we are equipped with a validation tool, we need to be able to edit the
COLLADA document, locate the error and fix it. As XML is basically text, any
text-editing tool (Notepad, Vi) would do. Most text editing tools provide syntax
highlighting. We can also use Visual Studio to edit the COLLADA document as
seenin Figure9.2 .
One issue with XML validation is that it often does not return a line number.
This is because carriage return and any number of tabs or white spaces have the
same meaning in XML. In fact, a lot of applications do not even bother with new
lines, as these are useful only for humans, so the entire document can be stored in
a single line of text, which most text editors can't handle.
Going back to the error found by the validator, the first thing to do is to search
for the issue in the file. Standard text editors provide basic search function that can
be used for that purpose. The validator told us we are looking for a cam element,
so, for example, let's use Visual Studio to search for the child element cam ,which
canbefoundbylookingfor <cam ,asshownin Figure9.3 .
The validator also told us that a valid element should be either camera or asset ,
so we can replace cam with camera , save the file, and make sure it is valid.
 
Search WWH ::




Custom Search