Click here to Skip to main content
16,005,236 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XML MessageBoard Pin
Geo Pa4-May-07 9:58
Geo Pa4-May-07 9:58 
GeneralRe: XML MessageBoard Pin
AndreaTheDove4-May-07 10:08
AndreaTheDove4-May-07 10:08 
GeneralRe: XML MessageBoard Pin
AndreaTheDove4-May-07 21:23
AndreaTheDove4-May-07 21:23 
GeneralRe: XML MessageBoard Pin
Geo Pa5-May-07 4:33
Geo Pa5-May-07 4:33 
GeneralRe: XML MessageBoard Pin
AndreaTheDove5-May-07 5:11
AndreaTheDove5-May-07 5:11 
GeneralRe: XML MessageBoard Pin
Geo Pa5-May-07 6:03
Geo Pa5-May-07 6:03 
GeneralRe: XML MessageBoard Pin
AndreaTheDove5-May-07 6:06
AndreaTheDove5-May-07 6:06 
QuestionReading and writing to an xml document Pin
steve_rm4-May-07 7:02
steve_rm4-May-07 7:02 
Hello,

I am trying to read and write to a xml document into a dataset, but got an error message that cannot find the file path.

This is using the Compact Framework 2.0, so cannot use the currentDirectory or startupPath, I have used the code below. However, the path i get is \programFile\PDACodeRedWM5 which is returned

PDACodeRedWM5 being the name of my project.

However, this path doesn't exist on my file system. So i got an error saying 'Could not find a part of the path '\C:\Program Files\PDACodeRedWM5\webServiceUrl.xml'.

So i created this actual path on my file system and still got the same error message.

This is my code so you can have a better understanding, I am trying to read in a xml file into a Dataset.

Try<br />
            'File the xml file<br />
            Dim fileName As String = String.Empty<br />
            Dim ds As New DataSet<br />
            Dim dv As DataView<br />
<br />
            Dim path As String<br />
            path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)<br />
            path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules(0).FullyQualifiedName)<br />
<br />
            'Read in the xml file<br />
<br />
            fileName = String.Format("{0}\WebServiceURL.xml", path)<br />
<br />
            ds.ReadXml(fileName)<br />
<br />
            'Find if a url already exists<br />
            dv = New DataView(ds.Tables(0))<br />
<br />
            If (dv.Count = 0) Then<br />
                'This is the first time the application is running, so input from user<br />
                Dim objInputURL As New InputURL()<br />
                objInputURL.ShowDialog()<br />
            Else 'Set the URL to the current web service location<br />
                Dim objUrl As New Globals<br />
                objUrl.UrlPath = ds.Tables(0).Rows(0)("url").ToString()<br />
            End If<br />
<br />
        Catch ex As Exception<br />
            MsgBox(ex.Message)<br />
        End Try


If the programFile\PDACodeRedWM5 has not been created why does it give that file path?

The actual path the application is in, is on my D drive.

Many thanks for any help,

Steve
AnswerRe: Reading and writing to an xml document Pin
led mike4-May-07 16:56
led mike4-May-07 16:56 
QuestionXML into DB webservice Pin
ukfrosty4-May-07 4:57
ukfrosty4-May-07 4:57 
AnswerRe: XML into DB webservice Pin
led mike4-May-07 17:02
led mike4-May-07 17:02 
Questionfile vsdisco doesn't come up Pin
hariyani3-May-07 19:27
hariyani3-May-07 19:27 
AnswerRe: Parent Node of Selected Text Pin
sathesh pandian28-Jun-07 1:37
sathesh pandian28-Jun-07 1:37 
QuestionHow to search a node in XML? Pin
Affan Toor3-May-07 4:32
Affan Toor3-May-07 4:32 
AnswerRe: How to search a node in XML? Pin
Stefan Troschuetz3-May-07 9:08
Stefan Troschuetz3-May-07 9:08 
GeneralWrite XML from DataSet in ASP.Net Pin
Psycho-*Coder*-Extreme2-May-07 14:52
Psycho-*Coder*-Extreme2-May-07 14:52 
AnswerRe: xml Pin
Stefan Troschuetz1-May-07 23:30
Stefan Troschuetz1-May-07 23:30 
QuestionXml parser C Pin
deeps_cute1-May-07 21:30
deeps_cute1-May-07 21:30 
AnswerRe: Xml parser C Pin
Stefan Troschuetz1-May-07 21:34
Stefan Troschuetz1-May-07 21:34 
GeneralRe: Xml parser C Pin
deeps_cute1-May-07 21:42
deeps_cute1-May-07 21:42 
GeneralRe: Xml parser C Pin
Stefan Troschuetz1-May-07 21:53
Stefan Troschuetz1-May-07 21:53 
GeneralRe: Xml parser C Pin
DavidNohejl2-May-07 11:51
DavidNohejl2-May-07 11:51 
QuestionXSD validation on recursive XML elements [modified] Pin
janBarP1-May-07 20:44
janBarP1-May-07 20:44 
AnswerRe: XSD validation on recursive XML elements Pin
Stefan Troschuetz1-May-07 21:32
Stefan Troschuetz1-May-07 21:32 
AnswerRe: XSD validation on recursive XML elements Pin
BoneSoft2-May-07 4:52
BoneSoft2-May-07 4:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.