Code: Select all
<object>
<attributes>
<data name="adhar" value="non" />
<data name="barbu" value="non" />
<int name="Id" value="16" />
<string name="name" value="Ashara" />
</attributes>
</object>
Code: Select all
<object>
<attributes>
<data name="adhar" value="non" />
<data name="barbu" value="non" />
<int name="Id" value="16" />
<string name="name" value="Ashara" />
</attributes>
</object>
Code: Select all
<npc>
<object>
<attributes>
<data name="one" value="non" />
<data name="two" value="non" />
<int name="id" value="-1" />
<string name="name" value="Ashara" />
</attributes>
</object>
<object>
<attributes>
<data name="one" value="non" />
<data name="two" value="bone" />
<int name="id" value="-1" />
<string name="name" value="Talim" />
</attributes>
</object>
</npc>
Code: Select all
while(xml->read())
{
switch(xml->getNodeType())
{
case EXN_ELEMENT:
{
if(tag.equals_ignore_case(xml->getNodeName())
{
IAttributes* attr = fs->createEmptyAttributes(driver);
attr->read(xml);
// Load Nps data
// Don't know
// Load id and names
s32 id = attr->getAttributesAsInt("id");
stringc name = attr->getAttributeAsString("name");
// Create Npcs
-----------------
-----------------
}
}
}
}