Skip to content

Commit 88267c3

Browse files
committedApr 19, 2021
Minor documentation update
1 parent c699beb commit 88267c3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ UdonXML is an XML parser written in Udon for VRChat.
66
The purpose of this project is for it to be used as an API in other bigger projects.
77
This work is something the average VRChatter never will notice, but something the author hopes might be beneficial and make the life easier for world/game creators in VRChat.
88

9-
An example use of this library is allowing the player to paste the entire contents of an XML file (e.g. game save file) into an Input field in VRC, and allowing the world to then parse the submitted data.
10-
Work is currently undergoing on implementing a ZIP decoder for this same purpose, please join the Discord for notification on future updates.
9+
An example use of this library is allowing the player to paste the entire contents of an XML file (e.g. game save file) into an Input field in VRC, and allowing the world to then parse the submitted data.dates.
10+
For this purpose a Zip parser library has also been implemented, which you can find [here, called UdonZip](https://github.com/Foorack/UdonZip).
1111

1212
## 🛠️ Setup
1313

@@ -28,7 +28,7 @@ Work is currently undergoing on implementing a ZIP decoder for this same purpose
2828
1. Declare a `public UdonXML udonXml;` variable in your program.
2929
2. Assign it the value of the UdonXML GameObject in your scene.
3030
3. Parse your XML data with LoadXml `udonXml.LoadXml(inputData);`. It will return an object.
31-
4. The object returned represents the root of the xml tree, use it when executing other nodes such as `GetNodeName` or `HasChildNodes`.
31+
4. The object returned represents the root of the xml tree, use it when executing other API functions such as `GetNodeName` or `HasChildNodes`.
3232

3333
### Example demo
3434

‎UdonXML.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
// ReSharper disable MemberCanBeMadeStatic.Global
4646
// ReSharper disable SuggestBaseTypeForParameter
4747
// ReSharper disable once InconsistentNaming
48+
// ReSharper disable once CheckNamespace
4849
public class UdonXML : UdonSharpBehaviour
4950
{
5051
/**
@@ -508,7 +509,7 @@ private string Serialize(object[] data, string padding)
508509
var tempData = GenerateEmptyStruct();
509510
tempData[0] = "/" + nodeName;
510511
tempData[2] = new object[] {null};
511-
work = AddFirstToObjectArray(work, new object[] {tempData, level});
512+
work = AddFirstToObjectArray(work, (object) new object[] {tempData, level});
512513
}
513514
}
514515

@@ -518,7 +519,7 @@ private string Serialize(object[] data, string padding)
518519
var o = nodeChildren[i];
519520
if (o != null)
520521
{
521-
work = AddFirstToObjectArray(work, new[] {o, level + 1});
522+
work = AddFirstToObjectArray(work, new [] {o, level + 1});
522523
}
523524
}
524525
}

0 commit comments

Comments
 (0)
Please sign in to comment.