Solved

Writing a Flash Binary

Posted on 2003-12-11
5
700 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now