static void TestRapidXml()
        {
            using (RapidXmlParser xml = new RapidXmlParser())
            {
                try
                {
                    string InContent = System.Text.Encoding.UTF8.GetString(System.IO.File.ReadAllBytes(@"G:\xxx.xml"));

                    xml.Load(InContent);

                    NodeElement projectNode = xml.FirstNode("Project");

                    NodeElement.EditorAssert(projectNode.IsValid());

                    NodeElement templateObjectListNode = projectNode.FirstNode("TemplateObjectList");
                    NodeElement actionNode             = projectNode.FirstNode("Action");
                    NodeElement refParamNode           = projectNode.FirstNode("RefParamList");

                    NodeElement.EditorAssert(templateObjectListNode.IsValid());
                    NodeElement.EditorAssert(actionNode.IsValid());
                    NodeElement.EditorAssert(refParamNode.IsValid());
                }
                catch (System.Exception e)
                {
                    UnityEngine.Debug.LogError(e.Message);
                }
            }
        }
        public string GetValue()
        {
            EditorAssert(IsValid());

            IntPtr Result = RapidXmlParser.GetAttributeValuePtr(Document.NativeDocumentPtr, NativeAttrPtr);

            return(Result != IntPtr.Zero ? Marshal.PtrToStringAnsi(Result) : "");
        }
        public string GetName()
        {
            EditorAssert(IsValid());

            IntPtr Result = RapidXmlParser.GetNodeTagPtr(Document.NativeDocumentPtr, NativeNodePtr);

            return(Result != IntPtr.Zero ? Marshal.PtrToStringAnsi(Result) : "");
        }
        // the same with AttributeString
        // created for compatible
        public string Attribute(string InName)
        {
            EditorAssert(IsValid());

            IntPtr Result = RapidXmlParser.AttributeStringPtr(Document.NativeDocumentPtr, NativeNodePtr, InName);

            return(Result != IntPtr.Zero ? Marshal.PtrToStringAnsi(Result) : "");
        }
        public NodeAttribute NextAttribute(string InName = null)
        {
            EditorAssert(IsValid());

            NodeAttribute Attr = new NodeAttribute();

            Attr.Document      = this.Document;
            Attr.NativeAttrPtr = string.IsNullOrEmpty(InName) ?
                                 RapidXmlParser.NextAttributePtr(Document.NativeDocumentPtr, NativeAttrPtr) :
                                 RapidXmlParser.NextAttributePtrWithName(Document.NativeDocumentPtr, NativeAttrPtr, InName);

            return(Attr);
        }
        public NodeElement NextSibling(string InName = null)
        {
            EditorAssert(IsValid());

            NodeElement Element = new NodeElement();

            Element.Document      = Document;
            Element.NativeNodePtr =
                string.IsNullOrEmpty(InName) ?
                RapidXmlParser.NextSiblingPtr(Document.NativeDocumentPtr, NativeNodePtr) :
                RapidXmlParser.NextSiblingPtrWithName(Document.NativeDocumentPtr, NativeNodePtr, InName);

            return(Element);
        }
        public double GetDouble()
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.GetAttributeValueDouble(Document.NativeDocumentPtr, NativeAttrPtr));
        }
        public float GetFloat()
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.GetAttributeValueFloat(Document.NativeDocumentPtr, NativeAttrPtr));
        }
        public UInt64 GetUInt64()
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.GetAttributeValueUInt(Document.NativeDocumentPtr, NativeAttrPtr));
        }
        public bool GetBool()
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.GetAttributeValueBool(Document.NativeDocumentPtr, NativeAttrPtr));
        }
        public int GetAttributeCount()
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.GetAttributeCount(Document.NativeDocumentPtr, NativeNodePtr));
        }
        public float AttributeFloat(String InName)
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.AttributeFloat(Document.NativeDocumentPtr, NativeNodePtr, InName));
        }
        public uint AttributeUInt(string InName)
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.AttributeUInt(Document.NativeDocumentPtr, NativeNodePtr, InName));
        }
        public bool HasAttribute(String InName)
        {
            EditorAssert(IsValid());

            return(RapidXmlParser.HasAttribute(Document.NativeDocumentPtr, NativeNodePtr, InName));
        }