Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
Nick Lamprecht edited this page Jul 23, 2020 · 3 revisions

Table of Contents

Usage

Creating the Parser

The first step is to create a Parser Object Reference using the Create Parser node. You have to save the output of this node as a variable! Doing otherwise will result in a new parser being created every time you use the return value, making it useless.
image

Loading the File

With your newly created Parser Object Reference you can call the Load File node. The path to the file has to be an absolute path and must include the extension .xml! The Boolean that gets returned is for your error handling only. You can safely call all other parsing related nodes on a parser with no file: They will just do nothing.
image

Creating the Event Bindings

At the current state (1.0) you can only parse a file with the help of events. In order to do so, we have to bind a custom event to the On Next Node delegate.
Tip: If you drag the event pin of the "Bind Event to On Next Node" node to an empty space in your blueprint graph, you can create a custom event with the matching "Node" pin easily!

image

Now all you need to do is to use the BPXmlNode struct that is returned by the event to do what you want! You could simply save it away, or look for specific values / tags.

image

You should also consider binding an event to the On Parsing Finished delegate. Using this event you'll know when the parsing is done!

image

Start Parsing!

To start the actual parsing process you have to simply call the Start Parsing node. It is as easy as that!

image

Manipulating a Node

There are two ways to manipulate a node:

  1. You can change its content / value using one of the Set Content nodes:

image

  1. You can append new nodes to it using one of the Append Node nodes:

image

Saving your changes

When you are done you have to save your changes with the Save File node. By default, the file is saved with the same path used when loading, but you can override the location here with an absoulte path include the .xml extension.

image