Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by beechnova · Mar 19, 2016 at 12:09 PM · unity5xmldatadisplay

How to display data from an external XML file?

Hello,

This is an example of the XML file I want to display:

http://beechnova.tigrimigri.com/test.xml

The file loads with no problems using this script:

using UnityEngine;
using System.Collections;
using System.Xml;
using System;

public class LoadXML : MonoBehaviour
{
IEnumerator Start()
{
//Load XML data from a URL
string url = "http://beechnova.tigrimigri.com/test.xml";
WWW www = new WWW(url);


//Load the data and yield (wait) till it's ready before we continue executing the rest of this method.
yield return www;
if (www.error == null)
{
//Sucessfully loaded the XML
Debug.Log("Loaded following XML " + www.data);


}
}
}

The problem is, I just can't seem to be able to display the text properly after it loads.

Basically, all I want to do is display the information from the XML file as "Text Mesh" in columns under their headings.

For example:

Dates: Destination: Cost:
When Where How much

It seems like it should be such a simple thing to do, and after trying various scripts and watching lots of videos on YouTube, I just can't seem to find a script that doesn't result in errors.

Hopefully someone can help me and put me out of my misery :)

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ArkaneX · Apr 11, 2016 at 08:46 PM 0
Share

Please take a look at my answer to similar question

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Ejpj123 · Apr 11, 2016 at 11:22 PM

Maybe this will help you: http://forum.unity3d.com/threads/xml-reading-a-xml-file-in-unity-how-to-do-it.44441/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by AcidFz · Sep 15, 2020 at 08:56 AM

So this code loads an xml file from a url

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

60 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Save multiple inputs for one item and print out all items 0 Answers

Unity's Live Training on Mac Retina Display 0 Answers

Not Fully Understanding how To Correctly Receive LDR Arduino Data 0 Answers

Save enemy data whether he is dead or not ? 0 Answers

Destroying assets is not permitted to avoid data loss? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges