Skip to content

Loading xi:include xml files from the program code #2403

Discussion options

You must be logged in to vote

I don't think there's a straight up example, but the steps would be something like:

  • Use XmlDocument::load() to load the file
  • Extract the Config object from the first XmlElement in the document by calling getConfig() on it
  • Call Layer::create(config) to create your new map layer from the Config.

You can look at the code that processes <xi:include> for guidance, near XmlUtils.cpp:253
Hope this helps :)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@davisjamesf
Comment options

@davisjamesf
Comment options

Answer selected by davisjamesf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants