20.04.2013, 10:29
Hey,
how can i get the name of an XML-File. (info / name)
I want to get the "[DM]Paris Hunter qsh tings By Gustavo".
I tried so, but it dont works. It will output: "Map: "
how can i get the name of an XML-File. (info / name)
Код:
<info gamemodes="race" type="map" name="[DM]Paris Hunter qsh tings By Gustavo" version="1.0.0" />
I tried so, but it dont works. It will output: "Map: "
Код:
format(MetaXML,sizeof(MetaXML),"%s/meta.xml",pathmeta); new XML:Meta = xml_open(MetaXML), data[64]; if(Meta) { xml_get_string(Meta, "info/@name",data); format(MapName,sizeof(MapName),"Map: %s",data); printf("%s",MapName); xml_close(Map); } else { printf(" ** Die Meta-XML \"%s\" wurde nicht gefunden.", pathmeta); xml_close(Meta); }