what's more important at this point is to determine what your application is
doing with the file...or any new properties. are you just trying to find a
way to better visually display (for readability sake) the xml?
"David A. Osborn" <do********@hotmail.com> wrote in message
news:eUcKe.235790$x96.175955@attbi_s72...
| What I meant by the file changing was that the the file format may change,
| ie another property may be added so I don't want to have to rewrite this
| code every time the vendor of the software updates their software. What
| would be nice is if I could pull the XML in as an object that
automatically
| had the properties that were listed in the XML, but I don't even know if
| that is possible. I think I am sort of looking for the opposite of a
| serialized class, if that makes any sense. Turn the XML into an object
| without actually knowing what that object is.
|
|
| "Joseph Bittman MCSD" <Ry*********@msn.com> wrote in message
| news:OM**************@TK2MSFTNGP14.phx.gbl...
| > August 9, 2005
| >
| > There are MANY ways you can read that file.... ADO.Net & SQL would be
| > complicated for such a simple task. Just look into Dataset.ReadXML &
| > XPathNavigators & XMLDocuments.... easy ways to retrieve data from XML
| > Files.... if the file changes, I would use a FileMonitor class (I hope
| > that is the exact name of it... I forget, maybe FileWatcher?) which will
| > fire an event that you can use to read the new file when it changes... I
| > hope this helps and have a great day!
| >
| > --
| > Joseph Bittman
| > Microsoft Certified Solution Developer
| >
| > Web Site:
http://71.39.42.23
| > Static IP
| >
| >
| >
| >
| > "David A. Osborn" <do********@hotmail.com> wrote in message
| > news:tT8Ke.235195$x96.189382@attbi_s72...
| >> Currently I have an XML file that come from an external program that
| >> looks something like this:
| >>
| >> <?xml version="1.0" ?><XML_FRUITBOWL_DATA_FILE FILEVERSION="1"
| >> APPVERSION="19">
| >> <FRUITBOWL Name="bowl1" Size="6" >
| >> <FRUIT Type="Apple" Quanity="1" Size="Big"
| >> Brand="Red Del." >
| >> </FRUIT>
| >> <FRUIT Type="Orange" Quanity="2" Size="small"
| >> Brand="none">
| >> </FRUIT>
| >> </FRUIT BOWL>
| >> <FRUITBOWL Name="bowl2" Size="24" >
| >> <FRUIT Type="Apple" Quanity="16" Size="small"
| >> Brand="Other" >
| >> </FRUIT>
| >> <FRUIT Type="Grape" Quanity="2" Size="medium"
| >> Brand="none">
| >> </FRUIT>
| >> </FRUIT BOWL>
| >> </XML_FRUITBOWL_DATA_FILE>
| >>
| >>
| >> At any time the external program could change and a new property could
be
| >> added. What is the best way for me to interact with this file? Can I
| >> read it in as a generic object and access properties with the dot
| >> notation? Or do I need to interact with the file with SQL statement
with
| >> ADO .NET?
| >>
| >>
| >>
| >>
| >>
| >
| >
| >
|
|
|