Jump to content

Search the Community

Showing results for tags 'parsing'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 8 results

  1. OK, first and foremost, am using classic ASP as that is what I have to work with. All electronic forms in my company are currently in classic ASP. Too many of them to move to .net any time soon. That said, I have written an html form that includes sending a SOAP request to our CRM (ticketing system) which is vendor hosted. They are supplying the .net web service to the CRM's database. This will send back a response not only of a successful receipt, but also a ticket number which I am to display to the customer's screen. I am pretty comfortable with the sending part, I think. It is the response I am not so sure about. I've done XML responses through a web service before; however, I've never had a response I would have to parse before. Here are the questions that I have: 1. Are the request and response generally coded in the same envelope or separately? 2. I'm pretty comfortable displaying text received in a response using xmlhttp.responseText, but HOW would you parse the SOAP response in classic ASP? Below is the code I have for the Request: strXML = "" strXML = strXML & "<?xml version=""1.0"" encoding=""UTF-8""?>" & strCR strXML = strXML & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" & strCR strXML = strXML & " <SOAP-ENV:Header>" & strCR strXML = strXML & " <m:header xmlns:m='http://VenderURL'>" & strCR strXML = strXML & " <docType>Esr Client</docType>" & strCR strXML = strXML & " <version>3.0</version>" & strCR strXML = strXML & " <sender type='CUSTSYSID'>WIN</sender>" & strCR strXML = strXML & " <receiver type='CUSTSYSID'>CCC</receiver>" & strCR strXML = strXML & " <requestSyncType>synchronous</requestSyncType>" & strCR strXML = strXML & " <deployment.Mode>test</deployment.Mode>" & strCR strXML = strXML & " <partner type='CUSTSYSID'>" & String & "</partner>" & strCR strXML = strXML & " <transactionId>" & IntPONumber & "</transactionId>" & strCR strXML = strXML & " <timestamp>" & strTimeStamp & "</timestamp>" & strCR strXML = strXML & " </m:header>" & strCR strXML = strXML & " </SOAP-ENV:Header>" & strCR strXML = strXML & " <SOAP-ENV:Body>" & strCR strXML = strXML & " <m:serviceRequest xmlns:m='http://VendorURL' action='String'>" & strCR strXML = strXML & " <ticketInfo ticketNumber='String'>" & strCR strXML = strXML & " <refTicketNumber>" & "intPONumber" & "</refTicketNumber>" & strCR strXML = strXML & " <openedDateStamp>" & strTimeStamp & "</openedDateStamp>" & strCR strXML = strXML & " <sentDateStamp>" & strTimeStamp & "</sentDateStamp>" & strCR strXML = strXML & " <transDateStamp>" & strTimeStamp & "</transDateStamp>" & strCR strXML = strXML & " <problemDescription>" & "strCCDescription" & "</problemDescription>" & strCR strXML = strXML & " <resolution code='String' timeStamp='YYYY-MM-DDTHH:MM:SS'>" & String & "</resolution>" & strCR strXML = strXML & " <shortDescription>" & strSubject & "</shortDescription>" & strCR strXML = strXML & " <status>2</status>" & strCR strXML = strXML & " <priority internalCode='3'/>" & strCR strXML = strXML & " <severity code='3'/>" & strCR strXML = strXML & " <sla contractId=””>" & strCR strXML = strXML & " <contractName>Winn-Dixie SLA Contract</contractName>" & strCR strXML = strXML & " </sla>" & strCR strXML = strXML & " <technician.id>" & strTechnician & "</technician>" & strCR strXML = strXML & " <category name='IssueCode1'>INCIDENT</category>" & strCR strXML = strXML & " <category name='IssueCode2'>HARDWARE</category>" & strCR strXML = strXML & " <category name='IssueCode3'>BREAK / FIX</category>" & strCR strXML = strXML & " </ticketInfo>" & strCR strXML = strXML & " <entitlement>" & strCR strXML = strXML & " <code>" & CustCode & "</code>" & strCR strXML = strXML & " </entitlement>" & strCR strXML = strXML & " <contact type='primary' vip=”false”>" & strCR strXML = strXML & " <company>WINN-DIXIE</company>" & strCR strXML = strXML & " <Email>WD REQ</Email>" & strCR strXML = strXML & " </contact>" & strCR strXML = strXML & " <serviceAddress site='0'>" & strCR strXML = strXML & " </serviceAddress>" & strCR strXML = strXML & " <equipment>" & strCR strXML = strXML & " <model>" & part_no & "</model>" & strCR strXML = strXML & " <description>" & strConfigItem & "</description>" & strCR strXML = strXML & " </equipment>" & strCR strXML = strXML & " <extrinsics name='FLEX2'>" & strPartDesc & "</extrinsics>" & strCR strXML = strXML & " </m:serviceRequest>" & strCR strXML = strXML & " <SOAP-ENV:Fault>" & strCR strXML = strXML & " <faultcode>SOAP-ENV:Client</faultcode>" & strCR strXML = strXML & " <faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>" & strCR strXML = strXML & " <faultactor>http://b2bqc.compucom.com/soap</faultactor>" & strCR strXML = strXML & " </SOAP-ENV:Fault>" & strCR strXML = strXML & " </SOAP-ENV:Body>" & strCR strXML = strXML & "</SOAP-ENV:Envelope>" ' End of Request section ' Call the webservice using POST baseURL="[url="https://b2bqc.compucom.com/ws/CcEsrV4:provider"]https://b2bqc.compucom.com/ws/CcEsrV4:provider[/url]" 'Link for Production Environment Set objXmlHttp = CreateObject("MSXML2.ServerXMLHTTP.3.0") objXmlHttp.setTimeouts toResolve, toConnect, toSend, toReceive objXmlHttp.Open "POST", baseURL, False objXMLHttp.Send(strXML) Here's the code for the response: strXMLResponse = ""strXMLResponse = strXMLResponse & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='[url="http://schemas.xmlsoap.org/soap/envelope/"]http://schemas.xmlsoap.org/soap/envelope/[/url]' xmlns:SOAP-ENC='[url="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/url]' xmlns:xsd='[url="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/url]'xmlns:xsi='[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]'>" & strCRstrXMLResponse = strXMLResponse & "<SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & " <serviceResponse>" & strCRstrXMLResponse = strXMLResponse & " <status code="?">string</status>" & strCRstrXMLResponse = strXMLResponse & " <statusMsg>string</statusMsg>" & strCRstrXMLResponse = strXMLResponse & " <ticketNumber>string</ticketNumber>" & strCRstrXMLResponse = strXMLResponse & " <refTicketNumber>string</refTicketNumber>" & strCRstrXMLResponse = strXMLResponse & " </ESR:serviceResponse>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Envelope>" ' XML Response from VendorresponseXML = xmlhttp.responseTextresponse.write("Your Ticket Number is: ") & "<b><font color='#cc0000' size='4'>" & responseXML & "</font></b>" Any guidance anyone can provide would be greatlly appreciated. Thanks, BillM
  2. How can we parse a word document using asp.net and c#. The question I have is with respect to parsing a word document, say a resume, to read the contents like name and email address. For this, I have an idea, but not sure of how to implement it. Can someone help me on this?My idea is: -Take the first line, if there are two or more words (other than curriculum vitae)separated by a single space or using a period(.) followed by a space, it is a name. -Take the second line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. -Consider the last line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. -Consider the second last line, if there are two or more words separated by a single space or using a period(.) followed by a space, it is a name. I know how to read tellno and email using patters, but, I dont know how to implement finding out the name. Is there any idea ?
  3. XML_Code.txtXML_Code.txtI am new to the world of XML, so need a little help on how to approach this issue. On trying to generate an XML file using an Oracle code, I obtain an incomplete XML tag at the end of the file. My guess is that the spanish content inside the XML is causing this. I have tried to change the encoding format from UTF-8 to ISO-8859-1, but the error still persisted. Here is a sample output:- HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Server: DWS/4.1 Cache-Control: no-cache Set-Cookie: JSESSIONID=2551F518D867AB17F8CA73885E7F9CA2; Path=/ Content-Type: text/XML;charset=UTF-8 Content-Length: 729 Date: Thu, 05 May 2016 12:56:37 GMT <?xml version="1.0" encoding="ISO-8859-1"?><subscriptionHistoryMA version="2.0.1"><batchAdjustmentMA><transactionId>210411850725724</transactionId><subscriberNumber>59899427796</subscriberNumber><transactionDateTime>2016-05-04T00:00:00+00:00</transactionDateTime><originNodeId>ADM_CMA</originNodeId><originNodeType>ADM</originNodeType><originTransactionId>527600</originTransactionId><transactionType>TT01</transactionType><transactionCode>ADC</transactionCode><accountStatus>10000000</accountStatus><accountGroupId>NULL</accountGroupId><externalData1>prueba á é ü N° í ñ ó ú</externalData1><externalData2>NULL</externalData2></batchAdjustmentMA></subscriptionHi This in turn causes a parsing error while trying to read the XML file through a browser, which is expected. The code used to generate this XML file is attached for reference. Any clues would be of great help. Thanks, Narayanan.XML_Code.txt
  4. Dear Friends, I am developing a Daisy player for Blinds . I can implement the basic needs yet, but could not do the sentence navigation using the SMIL. I am looking an idea for how the corresponding smil based on ncc.html is taken and can use that information for sentence navigation. If any body have idea in media handling using SMIL , please respond... Waiting for an advise Thanks Anes
  5. I'm designing a feature-rich website with object-oriented PHP and I have a performance question. My background is in C, C++ and C# (.NET) programming. Now all those are compiled whereas PHP is interpreted. The following require_once statements are at the top of each page: <?phprequire_once "_php/library/Session.php"; // Session class (session related functionality)require_once "_php/library/Databases.php"; // Databases class (database related functionality)require_once "_php/library/DatesTimes.php"; // DatesTimes class (date and time related functionality)require_once "_php/library/User.php"; // User class (user related functionality)require_once "_php/library/Page.php"; // Page class (page related functionality)require_once "_php/library/common.php"; // general functions?> // (X)HTML 5 code Now some of those files are large and have a lot of methods/functions that are rarely used but it makes sense to keep them there because of the design principles of OOP. However, where OOP shines the best is in languages such as C# where only the necessary parts of the application is loaded into memory (on the as-needed basis). My question is, will the PHP engine have to waste a lot of CPU parsing through the classes and their methods every time a page is requested even though they're not being used or is there only a performance cost when the methods are being envoked (this parsing is not necessary in C# because the code has already been compiled)? I'm just wondering if I should break down the OOP architecture into smaller units that don't make as much sense logically but do make sense performance-wise.
  6. Knowing several languages but rusty with javascript, I know how there can be pitfalls in learning bad habits or coming up with convoluted, less than optimal solutions that would make more sense in other languages, almost abusing the language rather than working off of what it does best. So I am wondering if anything is unoptimal with the code below. The xml file is being read in; the code expects a 'featurelist' tag where 'ideas' and 'chapters' are organised under other chapters (except the top-level ones). Right now the code doesn't acknowledge the idea tags, it just tries to render the chapters in a html 'table of contents' in a tree-like organisation. The outputted html is correct, but I inserted some extra code to skip tags of the wrong id. This is the particular hot-spot where I'm wondering if better solutions are available, perhaps built-in rather than writing it 'by hand'. <script type="text/javascript">function processxml(xmldoc) { i = 0; root = xmldoc.getElementsByTagName("featurelist")[0]; el = root.getElementsByTagName("chapter")[0]; /* Initiate contents */ str = '<ul id="contents">'; while(el && el != root) { if(c=el.getAttributeNode("htmlclass")) str += '<div id="' + c.value + '">'; str += "<li>" + el.getAttribute("title") +"</li>"; if((els = el.getElementsByTagName("chapter")).length) { /* Has child chapters */ str += "<ul>"; el = els[0]; continue; } esc = 0; while(!esc) { save = el; while((el = el.nextSibling) && el.nodeName != "chapter") ; if(!el) { /* No next sibling */ str += "</ul>"; el = save; while((el = el.parentNode) && el.nodeName != "chapter") ; if(!el) /* No parent */ break; else /* Found parent, look again for sibling */ continue; } else { /* We have next sibling */ if(c) str += "</div>"; esc = 1; } } } /* Terminate contents */ str += "</ul>"; alert(str);// document.write(str); document.body.innerHTML = str;} Or have I done everything as well as it could be done?
  7. Can someome please give me a dummy script that reads a data from a multilvel XML and parses it using Javascript and displays it in the html page. The catch is :- You are not allowed to use getElementByName and getElementById, etc... Only nodeType, childnode and other such attribuit is allowed.Please assist me here.
  8. Hi there, I have been looking up on how to use SOAP in relation to php and have managed to hit a bit of a snag with it. Basically on my server i get some information which is presented in xml format from sharepoint. I then wish to access this data from a php file on another server and print it out onto the screen. I have heard using a soap call is the best method for this. The problems i am having are as follows: Gaining authorisation to the xml file i which contains the soap contents i.e. how to log in with username and password Reading the soap content in php to capture some data and print it out Shown below is a copy of my data which is in an xml format: <xml><s:Schema id="RowsetSchema"><s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30"><s:AttributeType name="ows_DocIcon" rs:name="Type" rs:number="1"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_LinkFilename" rs:name="Name" rs:number="2"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Created" rs:name="Created" rs:number="3"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_Author" rs:name="Created By" rs:number="4"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_CheckoutUser" rs:name="Checked Out To" rs:number="5"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_" rs:name="Learner Name" rs:number="6"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_StartDate" rs:name="Start Date" rs:number="7"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_JobTitle" rs:name="Job Title" rs:number="8"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Region" rs:name="Region" rs:number="9"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Learner_x0020_Email" rs:name="Learner Email" rs:number="10"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType></s:ElementType></s:Schema><z:row ows_DocIcon="xml" ows_LinkFilename="learner_name.xml" ows_Created="2012-03-20 16:26:24" ows_Author="17;#**** *****" ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_="****** ******" ows_StartDate="2012-03-20 00:00:00" ows_JobTitle="Director" ows_Region="Durham" ows_Learner_x0020_Email="******@hotmail.co.uk"/></rs:data></xml> Ok so that is the code for one learner record which i am wanting to parse in php...all i want to know is, what do i do to get the learner e-mail address? (the one with the value xxxxx@hotmail.com from the page which requires authorisation to view it. So far i have tried the following with no luck (hashed out the main part of url as contains confidential material): <?php$xml = simplexml_load_file("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE");echo $xml->AttributeType() . "<br />";foreach($xml->children() as $child){echo $child->AttributeType() . ": " . $child . "<br />";}?> I have also tried the following php code to display the learner name field (that is the name starting with ows__ with letters, underscores and numbers as shown below). it just says failed to load external entity which i am unsure about: <?php$client = new SoapClient("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE", array(trace=>true, 'login'=>"*******", 'password'=>"*****"));$res = $client->row(array('ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_'=>5));print $res;?> As you can see i have hashed all of the confidential details out but if somebody could maybe correct my php code so that i can gain access to the file, parse an element from the xml and then display it on the screen then that would be great. Obviously i do have more records but only displayed the first one for demonstration purposes. I also have access to the request and response generated by the server if you wish to see them or maybe point me in the direction on how i can use them instead to print out the values in php. Many thanks, Mark
×
×
  • Create New...