Godot Version
3.5.1
Question
Hi,
has anyone knows how godot’s XMLParses works?
how its parsing xml?
how it knows where tag starts, where tag ends, where is data?
Can someone explain to me?
Or can someone show me to code of it?
Thanks
Efi
January 26, 2024, 2:42pm
2
It works like any other XML parser. It reads the XML stream and translates it into a dictionary with the same structure and values.
thanks @Efi but asked about technical details of it.
Wich way it uses? regex maybe?
And from where I can get code of it?
(I mean engine code about this)
Efi
January 26, 2024, 2:57pm
4
You can see the full sources of Godot Engine in github. Here’s the XMLParser source:
/**************************************************************************/
/* xml_parser.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
This file has been truncated. show original