Solved

Writing a Flash Binary

Posted on 2003-12-11
5
703 Views
Last Modified: 2012-06-27
Hi All

I am in need of the following...

1.  Read an XML file that contains the data
2.  and transform the XML and write a Flash binary file

I was told by some that it is easy and resources are available on the net. But as it is urgent I would like you experts to guide/help me out.

I am looking for some help or code examples that I can use from C#.

Thanks

Vrunda

0
Comment
Question by:vrunda
  • 2
5 Comments
 

Expert Comment

by:sentosa_gani
ID: 9926447
unfortunately, I don't have a .NET Documentation installed. But if you have, you can look for System.XML namespace where it has XMLParser class that is used to read an XML file that contains the data. To transform the XML, i don't really know.. i'm sorry
0
 
LVL 7

Accepted Solution

by:
TransBind earned 200 total points
ID: 9929078
This example uses the XMLTextReader class to extract the element names and text strings from the IntroToVCS.xml file and store the information in a string variable.

Example
System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader("c:\\IntroToVCS.xml");
         string contents = "";
         while (reader.Read())
         {
            reader.MoveToContent();
            if (reader.NodeType == System.Xml.XmlNodeType.Element)
               contents += "<"+reader.Name + ">\n";
            if (reader.NodeType == System.Xml.XmlNodeType.Text)
               contents += reader.Value + "\n";
         }
Console.Write(contents);

Copy the code and paste it into the Main method of a console application.

Replace "c:\\IntroToVCS.xml" with the actual file name.


About second question I am not sure what you mean? So I will try to guess it :)  I think you mean XSLT to transform the contents of an XML file into a proprietary binary format. XSLT is capable of outputing only text formats such as XML, HTML and Text. See the documentation for xsl:output at

http://www.w3.org/TR/xslt#output

However, you can produce a text encoding of any data format using something like base64.


0
 
LVL 7

Expert Comment

by:TransBind
ID: 9929098
This article demonstrates on how to use base64 encoding:

http://authors.aspalliance.com/nothingmn/default.aspx?whichpoll=nothingmn_121&aid=121
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question