Click here to Skip to main content
15,900,906 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best method to save dynamic data Pin
Richard Blythe6-Feb-08 11:23
Richard Blythe6-Feb-08 11:23 
QuestionHow to call javascript from asp:hyperlinkcolumn Pin
Exelioindia5-Feb-08 10:39
Exelioindia5-Feb-08 10:39 
AnswerRe: How to call javascript from asp:hyperlinkcolumn Pin
pmarfleet5-Feb-08 11:27
pmarfleet5-Feb-08 11:27 
GeneralFile transfer from one folder to another folder Pin
Deepak Nigam5-Feb-08 9:55
Deepak Nigam5-Feb-08 9:55 
GeneralIgnore this post. Cross posted in the VB.NET forum Pin
Dave Kreskowiak5-Feb-08 10:38
mveDave Kreskowiak5-Feb-08 10:38 
GeneralDesign controls on a Panel Pin
Edmundisme5-Feb-08 9:29
Edmundisme5-Feb-08 9:29 
GeneralRe: Design controls on a Panel Pin
Wes Aday5-Feb-08 10:06
professionalWes Aday5-Feb-08 10:06 
GeneralRe: Design controls on a Panel Pin
Edmundisme5-Feb-08 10:12
Edmundisme5-Feb-08 10:12 
Questioncan C# make control transparent Pin
netJP12L5-Feb-08 9:17
netJP12L5-Feb-08 9:17 
AnswerRe: can C# make control transparent Pin
Giorgi Dalakishvili5-Feb-08 9:29
mentorGiorgi Dalakishvili5-Feb-08 9:29 
AnswerRe: can C# make control transparent Pin
Edmundisme5-Feb-08 9:58
Edmundisme5-Feb-08 9:58 
GeneralRe: can C# make control transparent Pin
netJP12L5-Feb-08 10:21
netJP12L5-Feb-08 10:21 
GeneralRe: can C# make control transparent Pin
Edmundisme5-Feb-08 13:33
Edmundisme5-Feb-08 13:33 
GeneralRe: can C# make control transparent Pin
Anthony Mushrow5-Feb-08 13:59
professionalAnthony Mushrow5-Feb-08 13:59 
QuestionException Handling architecture/framework? Pin
kumar.bs5-Feb-08 7:55
kumar.bs5-Feb-08 7:55 
AnswerRe: Exception Handling architecture/framework? Pin
eggsovereasy5-Feb-08 9:10
eggsovereasy5-Feb-08 9:10 
GeneralRe: Exception Handling architecture/framework? Pin
led mike5-Feb-08 12:08
led mike5-Feb-08 12:08 
GeneralRe: Exception Handling architecture/framework? Pin
kumar.bs5-Feb-08 13:05
kumar.bs5-Feb-08 13:05 
GeneralCrystal_Report Pin
simworld5-Feb-08 7:52
simworld5-Feb-08 7:52 
GeneralRe: Crystal_Report Pin
SABhatti5-Feb-08 9:40
SABhatti5-Feb-08 9:40 
GeneralRe: Crystal_Report Pin
simworld6-Feb-08 7:24
simworld6-Feb-08 7:24 
GeneralRe: Crystal_Report Pin
PIEBALDconsult5-Feb-08 13:51
mvePIEBALDconsult5-Feb-08 13:51 
GeneralReading XML attributes without knowing the element name Pin
hpjchobbes5-Feb-08 7:33
hpjchobbes5-Feb-08 7:33 
I am just learning XML and C# so I appoligize for any inconvience in advance. The program I am working on interfaces with another program that I did not write. I create a XML request for the program to do something and it responds with an XML response that tells me if it was succesful. The problem I have is parsing the response to find out if there are any errors. A basic response looks like this:

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnErrror">
<CustomerAddRs statusCode="3110" statusSeverity="Error" statusMessage="The name was not valid"></CustomerAddRq>
<VendorAddRs statusCode="0" statusSeverity="None" statusMessage="Vendor succesfully added"></VendorAddRs>
</QBXMLMsgRq>
</QBXML>


The problem I have is that each of the elements could be different, as in this case, there is a VendorAddRs element and a CustomerAddRs element. I have been trying to use the XmlTextReader and XMLDoc to try and check to see if the statusCode is something other than 0.

A lot of the information I have found assumes that you know what element you are looking for. I don't care what the element is (if it's a customerAdd or a VendorAddRs) but really what the statuscode is and what the statusmessage is the code is anything other than 0.

I was thinking that I could just read through the xml and see if the node I'm at has any attributes, and if it does, check the first attibute to see if it starts with "statusCode" but that hasn't worked so far.

If there is an article or a post that someone could point me to, I'd appreciate it, as I have not had any luck finding an article that addresses this.

Thank you so much for your time.
GeneralRe: Reading XML attributes without knowing the element name Pin
Le centriste5-Feb-08 7:40
Le centriste5-Feb-08 7:40 
GeneralRe: Reading XML attributes without knowing the element name Pin
hpjchobbes5-Feb-08 7:53
hpjchobbes5-Feb-08 7:53 

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.