Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C# Programming

Vote on your favorite hash algorithm here!

C# Programming C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-2007, 12:30 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Credits: 0
Rep Power: 10
hoser2001 is on a distinguished road
Question Help me change this function please.

I have a function that accepts two strings (file paths) as inputs. What I need change this function so that it can accept datasets, or something I can pass in memory.
Code:
public void ReadAndValidate(string path2XMLFile, string path2XSDFile)
        {
            using (FileStream fs = File.Open(path2XMLFile, FileMode.Open, FileAccess.Read))
            {
                //GS - Create an xml document to hold our xml
                XmlDocument xdoc = new XmlDocument();

                //GS - Create a reader settings, add the schema, set for 
                //schema validation and add a validation event handler
                XmlReaderSettings settings = new XmlReaderSettings();
                settings.Schemas.Add(null, path2XSDFile);
                settings.ValidationType = ValidationType.Schema;
                settings.ValidationEventHandler +=
                    new ValidationEventHandler(settings_ValidationEventHandler);

                //GS - Load and validate the xml
                XmlReader reader = XmlReader.Create(fs, settings);
                xdoc.Load(reader);

                //GS - Close the file stream when we’re done
                fs.Close();
            }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-13-2007, 02:48 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Credits: 0
Rep Power: 10
hoser2001 is on a distinguished road
Default

Disregard the question, solved the problem myself, I don't think I was very descriptive with my problem anyway, but thanks to all those who bothered to look at the post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
multi-pass preprocessing kenna C and C++ 11 08-14-2007 10:45 AM
Reg Fucntion pointers sowmi C and C++ 9 07-29-2007 03:29 AM
small help in this generator function plz SamehSpiky C and C++ 3 06-22-2007 11:47 AM
Using change management Cosmet General Programming 2 10-30-2006 06:16 PM


All times are GMT -5. The time now is 08:49 AM.

Contest Stats

Xav ........ 1357.94
MeTh0Dz|Reb0rn ........ 1083.85
WingedPanther ........ 919.18
marwex89 ........ 906.86
morefood2001 ........ 903.18
John ........ 902.37
Brandon W ........ 789.89
chili5 ........ 312.39
Steve.L ........ 264.99
dcs ........ 240.34

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads