Skip to content

Pyrax/gtan-xsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gtan-xsd

XML Schema Definitions for GTA Network

Autocompletion in Visual Studio XML Validation in Visual Studio

How to use

All you need to do is to include this snippet in the root element of your XML file:

xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xmlns="http:https://gtan.azurewebsites.net/schema/resource"
xsi:schemaLocation="http:https://gtan.azurewebsites.net/schema/resource 
                    http:https://gtan.azurewebsites.net/schema/resource/meta.xsd"

The paths have to be replaced according to the type of XML you want to create (e.g. for an ACL.xml you would use the path "schema/resource/acl.xsd"). You can find a list of all the schemas to choose from below as well as a full example.

Note for Visual Studio: By default, Visual Studio disabled the automatic download of schema files. You can either active it in the settings or you can manually download the files and replace the second url in xsi:schemaLocation with the local path of the downloaded schema file.

Example:

<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
        xmlns="http:https://gtan.azurewebsites.net/schema/server"
        xsi:schemaLocation="http:https://gtan.azurewebsites.net/schema/server
                            http:https://gtan.azurewebsites.net/schema/server/settings.xsd">
  
    <servername>Example Testserver</servername>
    <maxplayers>20</maxplayers>
  
    <resource src="freeroam" />
    <resource src="speedometer" />
</config>

Example of a settings.xml for a server

List of schemas & docs

Schema Docs
/schema/resource/acl.xsd http:https://pyrax.github.io/gtan-xsd/resource/acl.html
/schema/resource/map.xsd http:https://pyrax.github.io/gtan-xsd/resource/map.html
/schema/resource/meta.xsd http:https://pyrax.github.io/gtan-xsd/resource/meta.html
/schema/server/settings.xsd http:https://pyrax.github.io/gtan-xsd/server/settings.html

Schema definitions can also be found in the directory schema.

Credits

XML Elements are based on the GTA Network Wiki.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Releases

No releases published

Packages