how to call xml
-
Hi there, Iam newbie for c# i like to know how we can load an xml file and read the node inside the xml file earlier my application use to call another appl to get txt file and read the node inside the text file. now i want to pass the xml file instead of the appl so the following are the existing code pls advice how i can do it Crosswalk_Holdings.Holdings ObjHoldings = new Crosswalk_Holdings.Holdings(); string strresponse =""; string strMarctxt = ""; XmlNode ObjMarcTxtNode; //by me 8/2/06 //strresponse = ObjHoldings.SendReceiveXML("http://203.78.8.89/scripts/vista/usmarc11.pl",strBIDNoForHoldings); XmlDocument ObjXMLHoldings = new XmlDocument(); ObjMarcTxtNode = ObjXMLHoldings.SelectSingleNode("//USMARC/TXT"); if(ObjMarcTxtNode!=null) { if (ObjMarcTxtNode.InnerText.Trim()!="") strMarctxt=Server.HtmlEncode(ObjMarcTxtNode.InnerText); } if (strMarctxt !="") { string tmpspace = "\n" + " "; strMarctxt= strMarctxt.Replace(tmpspace, " "); string strControlNo = ObjHoldings.ParseXML("008 |", strMarctxt).ToString(); if (strControlNo.Trim()!="") strRecLanguage= strControlNo.Substring(35,3); string strNativeDelimiter = " "; //Native Identifier //ISBN string strNativeISBN = ObjHoldings.Parse880XML("|020-",strMarctxt).ToString(); //'ISSN string strNativeISSN = ObjHoldings.Parse880XML("|022-",strMarctxt).ToString(); if (strNativeISBN.Trim()!="" || strNativeISSN.Trim()!="") { strNativeIdentifier = (strNativeISBN.Trim().Length>0?strNativeISBN + strNativeDelimiter:"") + strNativeISSN.Trim(); strNativeIdentifier = strNativeIdentifier.Replace("|",""); } pls advice how i can pass the xml file instead of the url and get info or tag 020 and 022 from the xml file. we have tag 020 and 022 in the xml file.pls advice