johnboy007_2006 Posted August 18, 2011 Share Posted August 18, 2011 Hi GuysI have created an XML sheet in Visual studio and i load it into Unity3D using XmlDocument xmlDoc = new XmlDocument();xmlDoc.LoadXml(moduleXMLFile.text); This works fine, now i have created a tool in c# that creates xml sheets with the specific data to save time. but this does not load.i get the following error: XmlException: Text node cannot appear in this state. Line 1, position 1.Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace)Mono.Xml2.XmlTextReader.ReadContent ()Mono.Xml2.XmlTextReader.Read ()System.Xml.XmlTextReader.Read ()System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader)System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader)System.Xml.XmlDocument.LoadXml (System.String xml)I created 2 identical XML sheets and one loads and the other one does not and i have not got a clue why.The xml's can be found at:http://www.power-by-design.co.uk/ptk/NotWorking.xmlhttp://www.power-by-design.co.uk/ptk/Working.xmlin my tool i load an existing xml by xmlDoc = new XmlDocument();xmlDoc.Load(filepath); and save it out by xmlDoc.Save(filepath); can anyone help ? Link to comment Share on other sites More sharing options...
johnboy007_2006 Posted August 18, 2011 Author Share Posted August 18, 2011 think i have it, it needs to save as ANSI not UTF Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.