Jump to content

Search the Community

Showing results for tags 'xml'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 178 results

  1. I created a schedule that imports table data from MSaccess database to MySql database a XML file is automatically created. Now in the XML file the function updates data by automatically recreating the table. Is there any way to update the new data by not deleting the table?here is my code: <?xml version="1.0" encoding="UTF-8" ?>- <job version="8.1">- <odbcimport>- <source> <host>localhost</host> <user>root</user> <pwd>admin</pwd> <port>3306</port> <ssl>0</ssl> <sslauth>0</sslauth> <clientkey /> <clientcert /> <cacert /> <cipher /> <charset /> <database>main_data</database> </source>- <dsn type="access"> <name>E:\Main_Data.mdb</name> <user>admin</user> <pwd>pass</pwd> </dsn>- <import source="query"> <query>select * from "AC_Group"</query> <table>ac_group</table> </import> <export target="data" />- <tables all="no">- <table source="Result" target="ac_group" type="MyISAM" index="no" foreignkey="no"> <ddl onconflict="recreate" /> <dml import="yes" onconflict="update" />- <triggers> <delete>no</delete> </triggers>- <columns>- <column> <source>ID</source> <target>id</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>yes</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Mach_No</source> <target>mach_no</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Dept_Name</source> <target>dept_name</target> <type>varchar</type> <length>255</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Group_No</source> <target>group_no</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Group_Say</source> <target>group_say</target> <type>varchar</type> <length>200</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_1</source> <target>time_1</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_2</source> <target>time_2</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_3</source> <target>time_3</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_4</source> <target>time_4</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_5</source> <target>time_5</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column> </columns> </table> </tables> <abortonerror>no</abortonerror> <sendreport send="no" /> </odbcimport> </job>
  2. 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
  3. I am trying to write a document which could help in filtering data from another XML document. E.g. <filter> <what> <include> <marital_staus/> <ms>single</ms> <!--nog = no of groups--> <include> <memberofgroups/> <gn>Football club</gn> <!--user is a member of this club--> </include> </include> </what></filter> What I want this code to do is to choose, first, the users who are members of Football club, and then out of those, chose the users who are single. But I cannot figure out how to write a stylesheet for this. I wrote this: <xsl:template name="temp"> <xsl:param name="a1"/> <xsl:param name="pro"/> <xsl:choose> <xsl:when test="$op = 'marital_status'"> <xsl:for-each select="/document/users/user"> <xsl:if test="marital_status=$a1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:when> <xsl:when test="$op = 'memberofgroups'"> <xsl:for-each select="/document/users/user"> <xsl:for-each select="./groups/member_of_group"> <xsl:if test=".=$a1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="include"> <xsl:call-template name="temp"> <xsl:with-param name="a1"> <xsl:apply-templates select="*[2]"/> </xsl:with-param> </xsl:call-template> </xsl:template> While calling the template I pass the correct values I suppose. Problem is I get all the users who are single, plus all the users who are members of that particular group. However I want single users who are also member of Football club. I don't want the stylesheet to be hard-coded, because I also want to do filtering based on other elements. I can not figure out how can I save the filtered elements into something which could be used as an input for the next XPath expression. Or am I making some mistake while writing the constraints for filtering the document. Or could there be any other more appropriate way of writing a document for filtering? I will much appreciate your help. And I have one xml document "document" and two elements "filter" and "users".
  4. Xml code is something like this <kids> <dennis> <age> 6 </age> <weight> 10 </weight> </dennis> <john> <age> 8 </age> <weight> 20 </weight> </john></kids><adults> <tom> <age> 36 </age> <weight> 110 </weight> </tom> <kramer> <age> 80 </age> <weight> 67 </weight> </kramer></adults> now i know how to access all the ages in the document, suppose i need to access the ages of only children, or only adults how will i do it using javascript?
  5. sepoto

    Working with XML & PHP.

    I have some data in a flat file. These are the fields: nameaddressziplatlng A row of data might look something like: fishing hole #1, Catalina Island U.S., 90704, 33.3, 118.4 There are fifty rows of data. I am trying with PHP to encode this data into an XML file. The ultimate goal is that the data will be stored on the disk in XML format and when requested PHP will read the XML file and retrieve the data and put it into an array so I can encode the data in JSON and send it back off to JavaScript (AJAX). I'm very familiar with working with flat files and SQL however XML is a bit unfamiliar to me as of yet. How would this be accomplished? Good Evening W3Schools!
  6. The purpose of this assignment is for you to exercise your skills on: 1) server side processing ofXML technologies, 2) consuming web services and 3) making use of digital map services. Your taskin this exercise will be to develop and implement a web-based personalized location based newsservice that will visualize news content in the digital maps based on the location of the particularnews.The system you will develop should provide the following functionality to its users.1. Your system should allow the users to aggregate three different RSS feeds (they should bepure RSS and NOT GeoRSS feeds). Examples of such feeds can be found at:http://newsrss.bbc.c...n/world/rss.xmlhttp://www.nytimes.c...rvices/xml/rss/2. User should be able to filter the aggregated RSS feeds using a random keyword (you canchoose the keyword freely) and based on that to generate a new RSS feed containing onlythe filtered news items.3. The system should enable transformation of the filtered RSS feed into a GeoRSS.4. The system should visualize the generated GeoRSS feed using a digital map service (such asGoogle Maps, Yahoo Maps, Bing Maps, OpenStreetMaps etc.)Im kinda stuck in here , can please somebody help me with my project , cause my teacher is really bad in explaining ...So please somebody help me !
  7. jo_rocks

    xslt and xpath problem

    Hi all,I have this XSLT: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/><xsl:template match="/"><xsl:apply-templates select="//prime"/></xsl:template> <xsl:template match="prime"> <xsl:apply-templates select="note[@style='tt']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <description> <xsl:value-of select="description"/> </description> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template><xsl:template match="prime"> <xsl:apply-templates select="note[@style='sms']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template></xsl:stylesheet> I want to show note type =tt and note type = sms in the same page because the content of each type is different, the problem with this xslt is that the note type sms is overwritting the note type = tt, in other words, it's only showing the note type= sms. How can I solve this... Thanks all
  8. sakat

    RSS and XML

    I wonder if anyone can help me? I am trying to connect to a RSS feed - which is in a xml file format - and display selected content from the feed in a web page; I am using a Wordpress site to display the output but I do not think that is really relevant. What I am stuck on is how exactly I import [connect to] the feed and then display selected content from the feed. I am used to dynamic content using PHP, MySQL, scripts, client and server side scripting etc so I feel that I should be able to work this out but am finding it very difficult to find reading material on the subject that I want. Can someone pls advise, detail:1. connect to a RSS feed2. display selected content from the feed using XML Thanks...
  9. XMLUser

    Brief question on creating DTDs

    Hi everyone, When creating a DTD, is there special syntax for when a child and grandchild element share the same name? i.e.: <!DOCTYPE Parent [<!ELEMENT name(#PCDATA)><!ELEMENT child(name,age)><!ELEMENT name(#PCDATA)><!ELEMENT age(#PCDATA>]> XMLuser
  10. Sharkadder

    Using SOAP with PHP

    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
  11. Hello all, I have following XML structure: <customlink xlink:href="anydoc.xml" xlink:title="a linked document">A document</customlink> How should an XML schema xsd-file look like that allows the xlink attributes? I've tried something like this: <complexType name="customlink" mixed="true"> <attribute name="xlink:href" /></complexType> But it doesn't work.
  12. Hello, I have an XML file called cookbook.xml as well as an XSL file linked to it, called cookbook.xsl that presents all the information found in the .xml file in an html table (with headings, seperate cells, etc.) Now I want to create an html file that will presenet the above complete table on page load, as well as some query fields above that table, so that the table is refreshed according to a user's input (filters..) More specifically: XML file: For each cookbook (represented by a recipestories element), the file contains information about its title, author(s), year and page numbers, among others As for the HTML file, the user should be able to filter the results appearing on the table as follows: for each of author, title and year, the user should be able to enter a value (e.g. 1990) as well as an operator (e.g., <, =, >) and retrieve the cookbooks satisfying the corresponding conditions (e.g., year=1990). The user should be able to enter conditions for any combination of these three properties. If no conditions are entered, all cookbooks should be returned. For author and title, the user should also be able to enter "contains" as an operator, along with some value. In this case, the system should return cookbooks where the corresponding author or title contains the value entered as a substring. For example, I might want all papers where the title contains the string "choco". The user should also be able to search for cookbookss by their number of authors. Here too an operator and value should be allowed (e.g., all cookbooks with at least 3 authors). The user should be able to specify the property (author, title, pages or year) by which the returned cookbooks should be sorted. This is where I am right now: <html> <script type="text/javascript"> function loadXML(file) //function for loading XML files{ var moz = (typeof document.implementation.createDocument != 'undefined'); var ie = (typeof window.ActiveXObject != 'undefined'); var xmlDoc; if (moz) xmlDoc = document.implementation.createDocument("", "", null); else if (ie) xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.load(file); return xmlDoc;} </script> <script type="text/javascript"> var xmlDoc = loadXML("cookbooks.xml");var stylesheet = loadXML("cookbooks.xsl");var moz = (typeof document.implementation.createDocument != 'undefined');var ie = (typeof window.ActiveXObject != 'undefined'); if (moz){ var nsResolver = stylesheet.createNSResolver(stylesheet.ownerDocument == null ? stylesheet.documentElement:stylesheet.ownerDocument.documentElement); ..........} else if (ie){ var value = stylesheet.selectSingleNode(............} </script> </html> that is pretty basic I know, but I'm also pretty lost and desperate and I don't know where to start from! Do I create an html form with the fields for the queries and a submit button? Do I then take all the values entered in the above form and "spread them out" in that NSResolver function I'm trying to create above, evaluate them and reapply the stylesheet to the xml file accordingly? Help!
  13. Usarjjaco

    New Guy On The Block With Some Questions

    Hello Everyone, Been awhile since I've visited, and once again I've delved into another wonderous endeavor. This is my first encounter with XML, so I'm looking for some pointers. First off, I will start with what I'm trying to accomplish. 1) The site I'm working on allows users to upload videos, the video upon upload is sent to an encoding server. I then need to grab the xml information from the encoding server and send it to the storage server, and then grab it from the storage server to put it into a mysql database on the site server so that the video is placed under the appropriate user. That's it in a nutshell, so my questions are basically - How to make the above happen upon the user clicking upload in one fluid motion. - How to do the API call to the encoding site, and then send that API information to the Storage server so it can take and store the information. - How to grab the API information from the storage server and parse it into a mysql database. The service we are using for encoding : www.encoding.comThe service we are using for video storage: www.vid.ly Any and all help is appreciated, even if it's in the form of material to read, I've looked at the XML tutorials on W3S, but still lacking the knowledge, it's not quite clicking. If there's any more information I need to supply please let me know! Thanks!
  14. I am a beginner and a building architect and not a developer, so please take pity. Ok, I have a XML file eported from an application, the data contains everything from materials to 3D info. I would like to extract a list of room numbers to a MySQL db and be able to pull that information into a dropdown selectable list for use by users on a web form. I have been using the loadxmldoc.js script from the tutorial to parse the file as a first step. The question is where do I go next? Also, the parsed text has a tag of "Name" and is a child of "Space". However, just parsing 'Name' brings with it the child text from Parents - "Location" and "Coordinate" which are different levels of the XML documents but have the same "Name" tags. How can I only pull the Space/Name text? and how can I get this to populate a drop down menu? Thank you in advance.
  15. sepoto


    http://asp.wheelpros.com/cs/ws/dealerline.ashx?service=makes&year=2010 In regards to the link above I have been told that I need to interact with the link via SOAP. I am new to SOAP so I am a bit lost really on how to interact with the message retrieved by the link. I know I want to get the message and store only the important parts in an array for use later. Does anyone have sample SOAP code for this? Thanks!
  16. I want to edit xml from asp and xslt like the demo from w3schools. I am running into some snags.What I am trying to do is create a job list that has an approval function. I already have the form uploading to the xml document that allows users to submit their jobs. I am using xslt to be able to change the status of them from pending to approve. so the new xslt file will display for users all of the approved jobs.Here is my xml file <?xml version="1.0" encoding="utf-8"?><blast><job status='approve'> <position>developer</position> <posted>01/19/2012</posted> <company>JCC</company> <city>Jackson</city> <state>MI</state> <process>webaddress.com</process> <contact>da boss</contact></job><job status='pending'> <position>lunch lady</position> <posted>01/19/2012</posted> <company>high school</company> <city>lansing</city> <state>MI</state> <process>website.com</process> <contact>da boss lady</contact></job></blast> Here is my xslt file that displays the pending jobs for approval <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <head> </head> <body> <form method="post" action="editBlast.asp"> <h2>Job Approval</h2> <table cellpadding="5" cellspacing="0" border="1"> <tr> <th>Status</th> <th>Approval Action</th> <th>Position</th> <th>Company</th> <th>City</th> <th>State</th> <th>Contact</th> <th>Posted</th> </tr> <xsl:for-each select="blast/job[@status='pending']"> <tr> <td><xsl:value-of select="@status"/></td> <td> <input type="textbox" id="status" name="status" > <xsl:attribute name="value"> <xsl:value-of select="@status"/> </xsl:attribute> </input> Approve </td> <td><xsl:value-of select="position"/></td> <td><xsl:value-of select="company"/></td> <td><xsl:value-of select="city"/></td> <td><xsl:value-of select="state"/></td> <td><xsl:value-of select="contact"/></td> <td><xsl:value-of select="posted"/></td> </tr> </xsl:for-each> </table> <p><input type="submit" id="submit" name="submit" value="Submit"/> <input type="reset" id="reset" name="reset" value="Reset"/></p> </form> </body> </html></xsl:template></xsl:stylesheet> Here is my asp file: <%'-----------------------------------------------------------'The "loadXMLFile" Function accepts two parameters.'strXMLFile - The path and file name of the XML file.'strXSLFilee - The path and file name of the XSL file.'-----------------------------------------------------------Function loadXMLFile(strXMLFile, strXSLFile)'Declare local variablesDim objXMLDim objXSL 'Instantiate the XMLDOM Object that will hold the XML file.set objXML = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objXML.async = false'Load the XML file.objXML.load(strXMLFile) 'Instantiate the XMLDOM Object that will hold the XSL file.set objXSL = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objXSL.async = false'Load the XSL file.objXSL.load(strXSLFile) 'Use the "transformNode" method of the XMLDOM to apply the'XSL stylesheet to the XML document. Then the output is'written to the client.Response.Write(objXML.transformNode(objXSL))End Function '-----------------------------------------------------------'The "updateXML" Function accepts one parameter.'strXMLFile - The path and file name of the XML file.'-----------------------------------------------------------Function updateXML(strXMLFile)'Declare local variables.Dim objDomDim objRootDim objFieldDim x 'Instantiate the XMLDOM Object.set objDOM = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objDOM.async = false'Load the XML file.objDOM.load strXMLFile 'Set the objRoot variable equal to the root element of the'XML file by calling the documentElement method of the'objDOM (XMLDOM) object.Set objRoot = objDom.documentElement 'Iterate through the Form Collection and write the'submitted values to the XML file.For x = 1 to Request.Form.Count 'Check see if "btn" is in the submitted value, if so, 'it is a button and should be ignored. If instr(1,Request.Form.Key(x),"btn") = 0 Then 'Set objField variable equal to a field_value element by 'calling the selectSingleNode method of the objRoot '(documentElement) object. The SelectSingleNode method 'accepts a string parameter for querying the XML document. 'In this case, the current value of the key property of 'the Form Collection is used to find the appropriate 'field_value element (more on this later). Set objField = objRoot.selectSingleNode("job[@status='" & _ Request.Form.Key(x) & "']") 'Set the text property of the objField (field_value) 'element equal to the value of the current form field. objField.Text = Request.Form(x) End IfNext 'After the XML file has been edited, is must be saved.objDom.save strXMLFile 'Release all of your object references.Set objDom = NothingSet objRoot = NothingSet objField = Nothing 'Call the loadXMLFile method, passing in the newly edited'XML file and the updatedcontact.xsl style sheet. This will'allow the client to see the edited information. More on the'updatedcontact.xsl file later.loadXMLFile strXMLFile,server.MapPath("blast_approved.xsl")End Function 'Test to see if the form has been submitted. If it has,'update the XML file. If not, transform the XML file for'editing.If Request.Form("btnSubmit") = "" Then loadXMLFile server.MapPath("../../forms-results/xml/text.xml"), _ server.MapPath("blast_pending.xsl")Else updateXML server.MapPath("../../forms-results/xml/text.xml")End If%> and finally my xslt file to display the approved jobs <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body><h2>Job Blast</h2> <table cellpadding="5" cellspacing="0" border="1"> <thead> <tr> <th>Position(s)</th> <th>Company</th> <th>City</th> <th>State</th> <th>Contact Information</th> <th>Posted</th> </tr> </thead> <tbody> <xsl:for-each select="blast/job[@status='approve']"> <xsl:sort select="posted" order="descending"/> <tr> <td><xsl:value-of select="position"/></td> <td><xsl:value-of select="company"/></td> <td><xsl:value-of select="city"/></td> <td><xsl:value-of select="state"/></td> <td><xsl:value-of select="contact"/></td> <td><xsl:value-of select="posted"/></td> </tr> </xsl:for-each> </tbody> </table> </body> </html></xsl:template></xsl:stylesheet> Thanks for your help!
  17. pukapuka

    Plz Help To Find Photos Album Id?

    ok so i want to find the phots album id like this: /export/xml/photos?userName=uchylaci|77f322df&albumDir=Kata_narozky iknow everything but i dont know how to find the key: "77f322df" without it i cant find my photos every album got diffrent key so what i need to do to find it plz your help thxxxx
  18. I am working on a website for my work but they will not give me a webserver. So basically I have to run it off a fileshare. This limits me to HTML, Javascript, and CSS formats to get anything done. I need to be able to accept data entered into a form and store it somewhere so it can later be queried for analysis in another website type format. Any suggestions? Somethings to keep in mind also so you know what I'm working with here. - older dell workstations running XP- IE7 is the only browser we are able to use on the work machines- No web server access or ability to pull in data from outside resources since the machines do not have internet access.
  19. ChopShop

    Adding Quotes To Xml Strings?

    Hello, I am currently needing an XSLT to take an XML file and add quote marks around each string. Does anyone know how to add quote marks around each string? I can't seem to get this to work. Below are samples of the XML that I am dealing with... Example 1: <resources><string-array name="exercise_intensities"><item>None</item><item>Low</item><item>Medium</item><item>High</item></string-array></resources> Example 2: <resources><string name="hello">Hello World!</string><string name="app_name">Test App</string><string name="range_separator">-</string><string name="comma_separator">,</string><string name="no">No</string></resources> So, in Example 1, I need to output an XML file that looks like this: <resources><string-array name="exercise_intensities"><item>"None"</item><item>"Low"</item><item>"Medium"</item><item>"High"</item></string-array></resources> Any help would be greatly appreciated.
  20. I'm a total newbie what comes to xsl:fo, so please advise me how get following requirement done.I've created a very complicated (in my opinion and compared to my knowledge and skills) xslt to generate xhtml from xml, now this needs to be transformed on demand (from that xhtml page since paging with alternating footers and headers seems to be impossible with other methods) as PDF.What is the best way to accomplish this?I thought that it could be done with javascript empedded to this xhtml page, Is there a xsl:fo styleseets available that would transform xhtml to PDF or perhaps some converter that would generate some xsl:fo templates based on existing xslt or xhtml?
  21. Hi guys! I have turned to this forum beacuse I am tired of serching on the web, this problem is already fuzzing my brain. Well lets start from the beginning. I am building an HTML application, with javascript and xml. My XML file is as below: <cadastro> <instrumento> <diareg>2011/11/25</diareg> <id>0107006</id> <idsetor>1</idsetor> <idgrupo>7</idgrupo> <idsequencia>006</idsequencia> <nome>Escala Graduada de Aço</nome> <modelo>Mecanico</modelo> <fabricante>Stanley</fabricante> <nserie>--</nserie> <capacidademin>0.0</capacidademin> <capacidademax>600.0</capacidademax> <resolucao>0.5</resolucao> <unidade>mm</unidade> <complemento>Escala com duas graduações em milímetro e polegada</complemento> <estado>conforme</estado> <tipocalibra>ci</tipocalibra> <procedimento>IT-FLB-53-CQ-037</procedimento> <proxdiacalib>2012/8/21</proxdiacalib> <periodocalib>365</periodocalib> <ficha> <dia>2011/11/25</dia> <certificado>CQ225/11</certificado> <hiperlink>N/A</hiperlink> <diacalib>2011/8/22</diacalib> <erromin>0.0</erromin> <erromax>0.05</erromax> <erromed>0.025</erromed> <incerteza>0.01</incerteza> <situacao>calibrado</situacao> <historico>Disponível para o uso</historico> <status>Conforme</status> <valor>0</valor> </ficha> </instrumento> <instrumento> <diareg>2011/11/25</diareg> <id>0113025</id> <idsetor>1</idsetor> <idgrupo>13</idgrupo> <idsequencia>025</idsequencia> <nome>Micrômetro Externo</nome> <modelo>Mecanico</modelo> <fabricante>Mitutoyo</fabricante> <nserie>86437051</nserie> <capacidademin>0.0</capacidademin> <capacidademax>25.0</capacidademax> <resolucao>0.01</resolucao> <unidade>mm</unidade> <complemento>Micrometro para medição de canal do Zeta.</complemento> <estado>conforme</estado> <tipocalibra>ci</tipocalibra> <procedimento>IT-FLB-53-CQ-037</procedimento> <proxdiacalib>2012/1/16</proxdiacalib> <periodocalib>60</periodocalib> <ficha> <dia>2011/11/25</dia> <certificado>CQ330/11</certificado> <hiperlink>N/A</hiperlink> <diacalib>2011/11/17</diacalib> <erromin>0.1</erromin> <erromax>0.1</erromax> <erromed>0.1</erromed> <incerteza>0.01</incerteza> <situacao>calibrado</situacao> <historico>Disponível para o CQ</historico> <status>Conforme</status> <valor>0</valor> </ficha> </instrumento></cadastro> I`m using this xml file as a simple database for my application, were I control info about instruments as caliper, micrometer, scales, and a lot of measuring equipment.Well as you can see i have "Cadastro" as my root element, "Instrumento" or instrument is the element that holds the info of the equipment.For my problem i have to query on the xml three elements from "instrumento", they are: <idsetor></idsetor>: this one holds the sector which the equipment belongs to. (its a number)<idgrupo></idgrupo>: this oneindicates the group of the equipment like(Digital caliper, Pressure Gauge,...) (its a number) <idsequencia></idsequencia>: this one indicates the sequential number of the equipment by order of arrival and registry (caliper 001, caliper 002, ...,caliper NNN) the <id></id> is a combination formed by the 3 elements above.Well during the registry I input two variables the sector and the group but the sequential number should be generated automaticaly obeying the sequence of the already registered equipments. my logic is request all the instruments with the same <idsetor> and <idgrupo> and after select from this set, the one with the highest <idsequencia>, and then: idsequencia = idsequencia + 1; Now reading about Xpath in the internet I got to this two Xpaths: 1 - "cadastro/instrumento[idsetor=+IDSETORaux+" and idgrupo="+IDGRUPOaux+]/idsequencia"2 - "/cadastro/instrumento/idsequencia[not(/cadastro/instrumento/idsequencia>.)]" The first returns all the <idsequencia> of all the instruments that have the same idsetor and idgrupo, pointed by the variables IDSETORaux and IDGRUPOaux respectively. The second returns te highest <idsequencia> of all the registered elements. Well I have been playing with this two xpaths, combining them in diferent ways but no success. Now i turn to you and ask, can you help me please???
  22. I have a JS script from XML to XHTML that is not working on an amazon server with IE. Our test server works fine, see the links below. Any suggestions would be appreciated. Our Server URL: http://linux2.aress.net/onsitereports/xml_to_xsl.php Works on all Browsers Amazon Server URL: https://onsitereports.com/xml_to_xsl.phpWorks on Safari, FireFox, Chrome but fails on IE Any help would be appreciated.
  23. programAngel


    if I have the following xml:<?xml version="1.0" encoding="utf-8" ?><NewDataSet> <office> <room /> </office> <office> <room></room> </office> </NewDataSet>if I am using simplexml to parse the file, how can I differentiate between the first case and the second?
  24. Fmdpa

    Crazy Php/xml Problem

    I am absolutely stumped on this problem. I've been trying to solve it for hours and hours. The problem is that whenever I perform the following code, instead of appending this once like it should: <rating> <value>(1-5)</value> <ip></ip> <id>id</id></rating> It appends it 21 times! Every time! I even switched my code to using SimpleXML instead of DOMDocument and it still did it! When I dump the XML code onto the page, it only shows it appended once. I am thoroughly confused. Anyway, here's SermonRatings.php: <?phprequire_once 'global.php';class SermonRating { public function add($rating, $sermon) { $domDoc = new DOMDocument(); $domDoc->formatOutput = true; $doc = $domDoc->load('sermon_ratings.xml'); $root = $domDoc->getElementsByTagName('ratings')->item(0); $rating_node = $domDoc->createElement('rating'); $value = $domDoc->createElement('value'); $value->appendChild($domDoc->createTextNode($rating)); $ip = $domDoc->createElement('ip'); $ip->appendChild($domDoc->createTextNode($_SERVER['REMOTE_ADDR'])); $sermon_id = $domDoc->createElement('id'); $sermon_id->appendChild($domDoc->createTextNode(xmlentities($sermon))); // xmlentities() defined in global.php; it is not the problem because this was happening before I added the function $rating_node->appendChild($value); $rating_node->appendChild($ip); $rating_node->appendChild($sermon_id); $root->appendChild($rating_node); $saved = $domDoc->save('sermon_ratings.xml'); return $saved; } // ...other unrelated methods...} $sr = new SermonRating;echo $sr->add(1, 'sermon.wma'); And here's sermon_ratings.xml: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ratings [ <!ELEMENT ratings (rating*)> <!ELEMENT rating (value , ip , id)> <!ELEMENT value (#PCDATA)> <!ELEMENT ip (#PCDATA)> <!ELEMENT id (#PCDATA)>]><ratings> </ratings> After I visit sermonRatings.php and those last two lines of code trigger the method execution and the file is modified and saved, there are 21 child <rating> elements in the file. I'm totally confused.
  25. cjy8s@yahoo.com

    Use Php For Product Pages On Shopping Website?

    So I am at the part of my website where I need to decide how to display individual products being sold on the website. I want to display the picture, a description, and link it to a paypal account where the individual product can be sold. But I am unsure how to do it. I could do it with HTML easily, but I am wondering if I should use PHP or another programming langauge so I dont have to create 1 page per product, so I dont have to create 50 additional pages. Im thinking that I would have to create a template page using HTML or PHP and then use the programming language to fill in the description and images according to which link (product) they click. How would I do this exactly? I dont have a ton of experience with PHP, am I way over my head? And would PHP would well with PayPal? again, would that be a huge project?