/* First We have to see if the app has an meta.xml.
This code is the same as for getting boot.dol*/
for(i = 3;i<=dircounter;i++){
if(applist.getDol() == true){//If the app has a dol
dp = opendir(applist.getDir());
while ((ep = readdir(dp))){
//If the folder has a meta.xml
if (strcmp(strlower(ep->d_name), "meta.xml") == 0 ){
/*NOTE:
strlower, or string lower is needed because
strcmp is case sensitive, so BOOT.DOL wouldn't
work*/
applist.setXml(true); //Set that the app has a dol
applist.setXmlDir(strcat(applist.getDir(),"/meta.xml")); // Set the directory
}
}
}
closedir(dp);
}
/*Now we get the Xml Data*/
for(i = 3;i<=dircounter;i++){
fileptr = fopen(applist.getXmlDir(),"rb");
if (fileptr == NULL){
fclose(fileptr);
} else {
//Make sure that the file has data
fseek(fileptr,0,SEEK_END);
long setting_size= ftell(fileptr);
rewind(fileptr);
if(setting_size > 0) {//If there is data
tree = mxmlLoadFile(NULL, fileptr, MXML_NO_CALLBACK);
fclose(fileptr);
data = mxmlFindElement(tree, tree, "app",NULL,NULL,MXML_DESCEND);
if (mxmlElementGetAttr(data,"name")){//If there is a name
applist.setName((char*)mxmlElementGetAttr(data,"name"));
}
if (mxmlElementGetAttr(data,"coder")){//If there is a coder
applist.setCoder((char*)mxmlElementGetAttr(data,"coder"));
}
//Will add rest later
}
}
}
When I add the the first half only (untill the /*Now we get the Xml Data*/) It shows the correct background, but no pictures show, but i can tell that the space for them is set (because of a bug it frezees when i click on a picture).|
Re: XML help August 19, 2009 09:05AM | Registered: 16 years ago Posts: 116 |
|
Re: XML help August 20, 2009 06:14AM | Registered: 16 years ago Posts: 444 |
|
Re: XML help August 20, 2009 09:02AM | Registered: 16 years ago Posts: 116 |
|
Re: XML help August 20, 2009 04:21PM | Registered: 16 years ago Posts: 444 |
|
Re: XML help August 29, 2009 05:57AM | Registered: 16 years ago Posts: 444 |
|
Re: XML help August 29, 2009 09:59AM | Registered: 16 years ago Posts: 116 |
|
Re: XML help August 29, 2009 04:46PM | Registered: 16 years ago Posts: 444 |
|
Re: XML help September 02, 2009 11:48PM | Registered: 16 years ago Posts: 13 |
|
Re: XML help September 03, 2009 07:04PM | Registered: 16 years ago Posts: 444 |