- Try to fix the msvc build.
[mono/afaerber.git] / tools / locale-builder / TextInfoEntry.cs
blobf7a04b5613ca010e40d83a92efeaaf13b85f9b8d
1 using System;
2 using System.Text;
3 using System.Collections;
4 using System.Xml;
5 using System.Xml.XPath;
7 namespace Mono.Tools.LocaleBuilder {
9 public class TextInfoEntry : Entry {
11 string ansi = "0";
12 string ebcdic = "0";
13 string mac = "0";
14 string oem = "0";
15 string listsep = ",";
17 public TextInfoEntry (int lcid, XPathDocument d)
19 string q = "/textinfos/textinfo [@lcid=" + lcid + "]";
20 XPathNodeIterator ni = (XPathNodeIterator) d.CreateNavigator ().Evaluate (q);
21 // no info, move along
22 if (! ni.MoveNext ())
23 throw new Exception ();
25 ansi = ni.Current.GetAttribute ("ansi", String.Empty);
26 ebcdic = ni.Current.GetAttribute ("ebcdic", String.Empty);
27 mac = ni.Current.GetAttribute ("mac", String.Empty);
28 oem = ni.Current.GetAttribute ("oem", String.Empty);
29 listsep = ni.Current.GetAttribute ("listsep", String.Empty);
32 public override string ToString ()
34 StringBuilder b = new StringBuilder ();
35 b.Append ("{ ");
36 b.Append (ansi);
37 b.Append (", ");
38 b.Append (ebcdic);
39 b.Append (", ");
40 b.Append (mac );
41 b.Append (", ");
42 b.Append (oem);
43 b.Append (", '");
44 b.Append (listsep);
45 b.Append ("' }");
47 return b.ToString ();