Solved

Writing a Flash Binary

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

840 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