C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2712
Number of posts: 5738

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
BIGINNER NEED HELP!!!!!!! Posted by sumanthan on 7 Feb 2013 at 1:44 PM
I need to convert the bible text to XML Balanced Tree Index.
First you have to convert each lines to XML.
example:
<line>1 text on the first line</line>
<line>2 text on the 2nd line</line>
<line>3 text on the 3rd line</line>
<line>4 text on the 4th line</line>
<line>5 text on the 5th line</line>
<line>6 text on the 6th line</line>
<line>7 text on the 7th line</line>
for the whole bible text,
Then you have create index XML
should look like "aaron"
<first text "a"></>
<second text "a"></>
<third text "r"></>
<word text ="aaron"></>
<line number> 122</> // these are the line which contain the word aaron when yo search the word "aaron"
<line number> 132</> // these are the line which contain the word aaron
<line number> 3222</> // these are the line which contain the word aaron

"the bible txt"
http://www.2shared.c...V1611Bible.html
"Exclude word when you search"
http://www.2shared.c...x9/exclude.html

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace Creating_Text_File_Using_Xml
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            XmlTextWriter XTW = new XmlTextWriter("savefile.xml", Encoding.Unicode);
            XTW.WriteStartDocument();
            XTW.WriteStartElement("XMLFILE");
            XTW.WriteStartElement("Title");
            XTW.WriteString(textBox1.Text);
            XTW.WriteEndElement();
            foreach(String item in listBox1.Items)
            {
                 XTW.WriteStartElement("Item");
                 XTW.WriteString(item);
                 XTW.WriteEndElement();
            }
            XTW.WriteEndElement();
            XTW.WriteEndDocument();
            XTW.Close();

        }
    }
}


The code i created is not complete!!!!
Any One Knows how to do it!!!!
Report
Re: BIGINNER NEED HELP!!!!!!! Posted by sumanthan on 18 Mar 2013 at 7:29 AM
Hi,,
I did it different way thanks for your interest and help.
Take Care
Have A Nice Day
If I have any more question I will post and waiting for your Reply.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.