Commit Graph

10 Commits

Author SHA1 Message Date
Leslie Nivison
ff3eaf36d2 Updating TPS files
[CL 2681371 by Leslie Nivison in Main branch]
2015-09-04 20:53:02 -04:00
Ben Marsh
55d1385e2e Add attribute serialization to XmlFile writer.
[CL 2548769 by Ben Marsh in Main branch]
2015-05-13 08:16:52 -04:00
Mike Fricker
2afcef78aa Fixed CIS error on mac with FastXml
[CL 2535895 by Mike Fricker in Main branch]
2015-05-04 12:14:44 -04:00
Mike Fricker
29e46a1bad Fast Xml parser for UE4
This is a simple XML parser that can load XML files very quickly.  The new FFastXml class has a single static method ParseXmlFile() for loading XML files.  The parser is designed to load files efficiently, but may not support all XML features or be resilient to malformed data.  Unlike the FXmlFile class, FFastXml does not generate an XML node tree.  Instead, you must supply a callback class using IFastXmlCallback and respond to elements and attributes as they are parsed.  Call the ParseXmlFile() function and pass in either the full path to the XML file to parse (XmlFilePath parameter), or load the file yourself and pass the contents using the XmlFileContents parameter.  One of either XmlFilePath or XmlFileContents must be valid for ParseXmlFile() to work.

To process the XML data, create your own class that implements the IFastXmlCallback interface.  This class will be responsible for processing the XML elements as they are loaded by FFastXml::ParseXmlFile().  You'll receive a ProcessElement() call for every XML element that is encountered, along with a corresponding ProcessClose() when that element's scope has ended.  ProcessAttribute() will be called for any attributes found within the scope of the current element.

Remember to add a module dependency on "XmlParser" in order to be able to call FFastXml::ParserXmlFile().

This XML parser based on John W. Ratcliff's "FastXml". (FastXml.tps included, with more info.)

[CL 2535797 by Mike Fricker in Main branch]
2015-05-04 11:00:39 -04:00
Ben Marsh
b21b7e3fa8 Fix parsing of XML attributes whose values contain '=' characters, and translate named entities correctly.
[CL 2516789 by Ben Marsh in Main branch]
2015-04-18 12:58:02 -04:00
Saul Abreu
79a26091bf Fixed behavior on FString::ParseIntoArray (muliple delimiters overload) functionality to support optionally culling empty strings. Greatly simplified implementation logic. Output parameter now properly named and taken by reference.
#codereview Steve.Robb, Robert.Manuszewski

[CL 2466824 by Saul Abreu in Main branch]
2015-03-02 15:51:37 -05:00
Jaroslaw Surowiec
2bcb1c27f1 XmlParser - Added method SetContent to the FXmlNode
[CL 2423994 by Jaroslaw Surowiec in Main branch]
2015-01-29 12:33:00 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Mike Fricker
a717a7e08d XML Parser: Allow anonymous discovery of node attributes
- Added new GetAttributes() method to FXmlNode that returns all of the attributes in the node

[CL 2346695 by Mike Fricker in Main branch]
2014-11-03 07:34:29 -05:00
Mike Fricker
07948b6ba6 Moved XmlParser from 'Developer' to 'Runtime' so it can be used in shipping games
[CL 2110490 by Mike Fricker in Main branch]
2014-06-19 11:22:41 -04:00