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


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

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 173 results

  1. I copied and pasted a file from the w3 tutorial XML/AJAX application but changed just a couple of spots so it could read my own XML data file. It doesn't work - what am I missing, please. When I open the console in either google or IE it says xmlDoc is null or undefined - somehow I'm not 'reading' the file or something? can anybody explain it more. I've read over the toturials a couple of times and I think it should be working. I have also cleaned out the cach in the browser by hitting cntrl F5, which I learned from someone along the way. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>S.C. Information</title> <style> table, th, td { border: 1px solid green; border-collapse:collapse; } th, td { padding: 5px; } </style> </head> <body> <button type="button" onclick="loadXMLDoc()">Get my S.C. Report</button> <br><br> <table id="demo"></table> <script> function loadXMLDoc() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myFunction(this); } }; xmlhttp.open("GET", "scTotals.xml", true); xmlhttp.send(); } function myFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="<tr><th>Service Club</th><th>Seasonal Total</th></tr>"; var x = xmlDoc.getElementsByTagName("Totals"); for (i = 0; i <x.length; i++) { table += "<tr><td>" + x.getElementsByTagName("ServClub")[0].childNodes[0].nodeValue + "</td><td>" + x.getElementsByTagName("TotalAmount")[0].childNodes[0].nodeValue + "</td></tr>"; } document.getElementById("demo").innerHTML = table; } </script> </body> </html> Data File 'scTotals.xml' in same website folder. <?xml version='1.0' encoding='utf-8'?> <dataroot> <Totals> <ServClub>Beukendall Eastern Star</ServClub> <TotalAmount>$ 447</TotalAmount> </Totals> <Totals> <ServClub>Key Club</ServClub> <TotalAmount>$ 363</TotalAmount> </Totals> <Totals> <ServClub>S.I. Group</ServClub> <TotalAmount>$ 201</TotalAmount> </Totals> <Totals> <ServClub>Sarah Bilofsky & Friends</ServClub> <TotalAmount>$ 182</TotalAmount> </Totals> <Totals> <ServClub>Schenectady ARC</ServClub> <TotalAmount>$ 1530</TotalAmount> </Totals> </dataroot> Any help would be appreciated. Gil
  2. Hi all, I'm just starting to get into website design, tho' I've been a programmer for many years. I've got a site going pretty well, but I really want to update the information on the site every day using tables. I am studying the AJAX/XML method and I think I must be missing something. After using the 'display CD collection' as a model, I couldn't get it to work. So then I tried copying & pasting the actual files from the example ( they list the xml file for your reference ) into a folder and Opened it with a google browser. I can get the button that says 'create my CD collection', but nothing happens when I click it. What am I missing; is there another article that might explain this in more detail and say exactly what's going on? Thanks
  3. Hello, this is my first post on the forum, hope you can help me because I´ve been struggling with this for a few months now. I´m also noy very good at coding, so it has been mostly try and error all the way. I´m exporting an xml file from stock management program, and then importing it to a woocommerce, wordpress site. The file contains around 1600 products, but the importer plugin (wp-all-import) is only reading the first 40 products. BUT! if pass the file trough a XML formater, like this one: https://www.freeformatter.com/xml-formatter.html ... then it reads all the products. So it works but I have to add this manual step, and I like it to be automated. Link to the original file: https://www.dropbox.com/s/qqfyn1ncbux7vrs/Articulos.xml?dl=0 I´m kind of sure it has something to do with the format of the XML. Can anyone look at my original fial an tell me what is wrong with it? thanks a lot!
  4. Missing XML Formatting

    BACKGROUND: I have recently created the content of an automatically generated podcast using a PHP Class that I found on a webpage found https://www.phpclasses.org/package/2957-PHP-Generate-RSS-2-0-feeds.html. Unfortunately, when I attempt to display the generated feed all that is displayed are the values of the input variables, or alternatively nothing (see (below)depending on the method of display. In short, the desired formatting -- the reason that I downloaded the PHP Class -- is missing. The page that creates the above result is a text file with a .php extension and a header( ) function. $rss_feed->encoding = 'UTF-8'; $rss_feed->version = '2.0'; $rss_feed->createFeed($rss_channel); header('Content-Type: text/xml; $rss_channel = the object that combines the formatting with the values of the input variables and their respective objects. The Class is relatively straight-forward and easily customized, but for two lines that I do not understand and could well be preventing the display of the XML code, if not properly configured. Interestingly, whether they are commented out or left in tact, they have no affect on what is displayed. $selfUrl = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on' ? 'http://' : 'https://'); $selfUrl .= $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; When I run the .php file the following message appears at the top of the completed page. Still nothing below the message appears. Also, I do not know the source of this message. it does not appear to come from the .php document. Now, I have not constructed a style-sheet for the Feed page, but I hardly see how this could stop the feed from appearingl Please advise.
  5. Here my question is how to print/display the numbers from pressed buttons(as shown in figure) using JavaScript. However, here I am working on a device and we have to control it from JavaScript. Below I have mentioned my code(.js) snippet:// Numbers functionfunction Numbers(cmd){System.Print("Command Sent is: "+cmd);var num = cmd;System.Print("Button pressed is: "+num);}// Displaying Numbersfunction Display(){Numbers(num);num.toString();dbgPrint("Displaying number: " + num);}And parameters for this function I am passing from some other file(.xml) as standard.<function name="Display" export="Display"><parameter name="display" type="string" description="Drag and drop this for clear-button function."></parameter></function><function name="Numbers" export="Numbers"><parameter name="command" type="mcinteger" description="Drag and drop this command for Numbers."><choice name="1" value="1"/><choice name="2" value="2"/><choice name="3" value="3"/><choice name="4" value="4"/><choice name="5" value="5"/><choice name="6" value="6"/><choice name="7" value="7"/><choice name="8" value="8"/><choice name="9" value="9"/><choice name="0" value="0"/></parameter></function>
  6. I need some help getting weather details temperature etc. out of this GML encoded WMS response XML file. This what I get from weather service that provides open data with Catalog Service for Web (CSW), Web Map Service (WMS) and Web Feature Service (WFS). Unlike JSON/XML, I have no idea what is happening in this file. Please suggest some solution for Swift 3. <?xml version="1.0" encoding="UTF-8"?> <wfs:FeatureCollection timeStamp="2017-07-31T15:48:01Z" numberMatched="1" numberReturned="1" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:om="http://www.opengis.net/om/2.0" xmlns:omso="http://inspire.ec.europa.eu/schemas/omso/3.0" xmlns:ompr="http://inspire.ec.europa.eu/schemas/ompr/3.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:sam="http://www.opengis.net/sampling/2.0" xmlns:sams="http://www.opengis.net/samplingSpatial/2.0" xmlns:target="http://xml.fmi.fi/namespace/om/atmosphericfeatures/1.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gmlcov/1.0 http://schemas.opengis.net/gmlcov/1.0/gmlcovAll.xsd http://www.opengis.net/sampling/2.0 http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd http://www.opengis.net/swe/2.0 http://schemas.opengis.net/sweCommon/2.0/swe.xsd http://inspire.ec.europa.eu/schemas/omso/3.0 http://inspire.ec.europa.eu/schemas/omso/3.0/SpecialisedObservations.xsd http://inspire.ec.europa.eu/schemas/ompr/3.0 http://inspire.ec.europa.eu/schemas/ompr/3.0/Processes.xsd http://xml.fmi.fi/namespace/om/atmosphericfeatures/1.0 http://xml.fmi.fi/schema/om/atmosphericfeatures/1.0/atmosphericfeatures.xsd"> <wfs:member> <omso:GridSeriesObservation gml:id="WFS-l9pen.SrlipXUb8ZfAc8nS2h_8.JTowuYWbbpdOs2_llx4efR060aeWzDtdOufXlmw48rp1w36d3R0629dnTTw36d3THv7ZeWHPlhaWLLn07qmnbltQ_wp37hjvCY2PlzrUi0Kcd06aMmrhnZd2Spp25bUP8KhE4V2nBm07sk7Lh5ZefSth2ackhmZ8u_Tk51mNmbRy2ZujXl899_LJf39svLvy09MOLZliaWzL2y7KnnhlqZmzfjw7MtambTfjSV3XpmcNbbh8RNPPph3Y8tK1dCA1tunnz07s9TL46VjTsM5lbd.TLsrM0aeWzDtZXDDyw7a1I.XfwkZdOfR0rWqZdvDLyw9OvLLWhQ5ZefPryy1oSOu3Tk09PNbVfTuyRNPLLj6ad.6tavp3ZKfDLlyTadZ1fTuyVZtOs6vp3ZK02nWtNw.NO3rtr6d2StCvp3ZI_Xn0rQiZe9Dfp3dK3qm_ph2Q9m_rkh7.2XlW5Xy4emjLyp.duLfsZ1tTN_eHs39ckPf2y8q4JuXJp67Yezf1yQ9_bLyrckac.iHs39ckPf2y8q3qHLLj08NPTD0079zHRXNQ5Zcenhp6Yemnfug7d_Xd0r2pYcmnD00790fZvxYdkHHj67euzD00791d1LDk04emnfumV4OPH129dmHpp37qwwqWHJpw9NO_dOy9KfXlmw48syvBx4.u3rsw9NO_dWGFSw5NOHpp37p2XpT68s2HHlp14OPH129dmHpp37q.KWHJpw9NO_dE05s3Xnlg48fXb12YemnfubnPpv5ZcnHrl5eb.nJXmFm26XTrNv5ZceHn0dOtGnlsw7XTrn15ZsOPK6dcN.nd0dOtvXZ008N.nd0x7.2Xlhz5Wh007ctPpl4T8hNDpp25bW_dlrGq1IYA-"> <om:phenomenonTime> <gml:TimePeriod gml:id="time-interval-1-1"> <gml:beginPosition>2017-07-31T16:00:00Z</gml:beginPosition> <gml:endPosition>2017-08-02T03:00:00Z</gml:endPosition> </gml:TimePeriod> </om:phenomenonTime> <om:resultTime> <gml:TimeInstant gml:id="time-1-1"> <gml:timePosition>2017-07-31T12:00:00Z</gml:timePosition> </gml:TimeInstant> </om:resultTime> <om:procedure xlink:href="http://xml.fmi.fi/inspire/process/hirlam"/> <om:parameter> <om:NamedValue> <om:name xlink:href="http://xml.fmi.fi/inspire/process/hirlam"/> <om:value> <gml:TimeInstant gml:id="analysis-time-1-1"> <gml:timePosition>2017-07-31T12:00:00Z</gml:timePosition> </gml:TimeInstant> </om:value> </om:NamedValue> </om:parameter> <om:observedProperty xlink:href="http://data.fmi.fi/fmi-apikey/e35dc8fd-a855-4db5-a327-418120f64a86/meta?observableProperty=forecast&amp;param=GeopHeight,Temperature,Pressure,Humidity,WindDirection,WindSpeedMS,WindUMS,WindVMS,MaximumWind,WindGust,DewPoint,TotalCloudCover,WeatherSymbol3,LowCloudCover,MediumCloudCover,HighCloudCover,Precipitation1h,PrecipitationAmount,RadiationGlobalAccumulation,RadiationLWAccumulation,RadiationNetSurfaceLWAccumulation,RadiationNetSurfaceSWAccumulation,RadiationDiffuseAccumulation&amp;language=eng"/> <om:featureOfInterest> <sams:SF_SpatialSamplingFeature gml:id="enn-s-1-1-"> <sam:sampledFeature> <target:LocationCollection gml:id="sampled-target-1-1"> <target:member> <target:Location gml:id="forloc-geoid-634963-pos"> <gml:identifier codeSpace="http://xml.fmi.fi/namespace/stationcode/geoid">634963</gml:identifier> <gml:name codeSpace="http://xml.fmi.fi/namespace/locationcode/name">Tampere</gml:name> <gml:name codeSpace="http://xml.fmi.fi/namespace/locationcode/geoid">634963</gml:name> <target:representativePoint xlink:href="#point-634963"/> <target:country codeSpace="http://xml.fmi.fi/namespace/location/country">Finland</target:country> <target:timezone>Europe/Helsinki</target:timezone> <target:region codeSpace="http://xml.fmi.fi/namespace/location/region">Finland</target:region> </target:Location></target:member> </target:LocationCollection> </sam:sampledFeature> <sams:shape> <gml:MultiPoint gml:id="sf-1-1-"> <gml:pointMembers> <gml:Point gml:id="point-634963" srsName="http://www.opengis.net/def/crs/EPSG/0/4258" srsDimension="2"> <gml:name>Tampere</gml:name> <gml:pos>61.49911 23.78712 </gml:pos> </gml:Point> </gml:pointMembers> </gml:MultiPoint> </sams:shape> </sams:SF_SpatialSamplingFeature> </om:featureOfInterest> <om:result> <gmlcov:MultiPointCoverage gml:id="mpcv-1-1"> <gml:domainSet> <gmlcov:SimpleMultiPoint gml:id="mp-1-1" srsName="http://xml.fmi.fi/gml/crs/compoundCRS.php?crs=4258&amp;time=unixtime" srsDimension="3"> <gmlcov:positions> 61.49911 23.78712 1501516800 61.49911 23.78712 1501520400 61.49911 23.78712 1501524000 61.49911 23.78712 1501527600 61.49911 23.78712 1501531200 </gmlcov:positions> </gmlcov:SimpleMultiPoint> </gml:domainSet> <gml:rangeSet> <gml:DataBlock> <gml:rangeParameters/> <gml:doubleOrNilReasonTupleList> 113.01 18.26 1007.03 92.74 259.0 3.79 113.01 17.79 1007.48 90.02 250.0 3.04 113.01 17.13 1007.82 93.62 229.0 2.19 113.01 16.42 1008.18 95.53 216.0 2.26 113.01 15.9 1008.89 97.09 211.0 2.74 </gml:doubleOrNilReasonTupleList> </gml:DataBlock> </gml:rangeSet> <gml:coverageFunction> <gml:CoverageMappingRule> <gml:ruleDefinition>Linear</gml:ruleDefinition> </gml:CoverageMappingRule> </gml:coverageFunction> <gmlcov:rangeType> <swe:DataRecord> <swe:field name="GeopHeight" xlink:href="http://"/> <swe:field name="Temperature" xlink:href="http://"/> <swe:field name="Pressure" xlink:href="http://"/> <swe:field name="Humidity" xlink:href="http://"/> <swe:field name="WindDirection" xlink:href="http://"/> <swe:field name="WindSpeedMS" xlink:href="http://"/> </swe:DataRecord> </gmlcov:rangeType> </gmlcov:MultiPointCoverage> </om:result> </omso:GridSeriesObservation> </wfs:member> </wfs:FeatureCollection>
  7. Error I receive while implementing this code: Exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'employee'. One of '{contractemployee}' is expected. What changes shall I make in my code to correctly implement the xml document from the given image Code: XML: <?xml version="1.0" encoding="UTF-8"?> <company> <companyname></companyname> <address></address> <department> <dname></dname> <deptphoneno></deptphoneno> <deptfaxno></deptfaxno> <deptemail></deptemail> <employee> <empid></empid> <ename></ename> <emailid></emailid> <phoneno></phoneno> </employee> <contractemployee> <name></name> <phoneno></phoneno> </contractemployee> </department> </company> XSD: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="catalog"> <xsd:complexType> <xsd:sequence> <xsd:element name="product" maxOccurs="unbounded" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="productname" type="xsd:string"></xsd:element> <xsd:element name="storagenumber" type="xsd:short"></xsd:element> <xsd:element name="dimension"> <xsd:complexType> <xsd:sequence> <xsd:element name="width" type="xsd:byte"></xsd:element> <xsd:element name="heigth" type="xsd:string"></xsd:element> <xsd:element name="depth" type="xsd:byte" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="description" type="xsd:string"></xsd:element> <xsd:element name="supplier" type="xsd:string" maxOccurs="unbounded" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
  8. Decode an xml node's content

    Hi, I exported a very large xml file from a chromatography software. I want to extract the UV absorbance data (Abs vs. time). I found this node: <GilsonDADAspenSpectralData><Result><SpectralDataXML><GilsonSpectralData><SpectralData> Also: <DataInfo><DataType>Absorbance</DataType><UserUnitsYAxis>1</UserUnitsYAxis><UserUnitsYAxisLabel>Absorbance</UserUnitsYAxisLabel><CompressedData Type="Simple" FirstValue="0" SecondValue="0" Size="Small" UnCompressedByteSize="81920" CompressedByteSize="19166" PercentReduction="76.60400390625" AsciiPercentReduction="90.6416015625" > This is followed by some strange jargon (not in its entirety): Is this some type of encoded data? The node mentions it is compressed data which led me to believe I need to decode or decompress the data to obtain what I need. I attached a txt file that contains snippets of the data. I am seeking x and y values to re-plot a graph (UV absorbance plot), so I would think this node should contain such data, but it contains some strange characters. I am not knowledgeable in xml or programming in general. Please share your expertise. Thanks. *The full xml file can be downloaded here: https://drive.google.com/open?id=0B6PdLXCwSg3BbTRnamRRbDYySFk snippet.txt
  9. Hello, I have a question about how to send form data to the database, without reloading the entire page. I discovered working with xmlhttprequest. I managed to show text from another file by implementing a javascript function with xhr into my script. I don’t know much about javascript and don’t understand how a javascript form should be added to an existing function. Finally this should run a php script executing the code to add the form data to the database. <!DOCTYPE html> <html> <body bgcolor="grey"> <center> <br><br><br> <div style="height: 200px; width: 600px; border: solid 2px blue;"> <div id="kn_ze"> <form id="my_form" action=""> Give your name: <input type="text" name="fname"> <br> <input type="submit" value="Send" onclick="loadXMLDoc();"> <!-- <button type="button" onclick="loadXMLDoc()">send it</button> --> </form> </div> </div> <script> function loadXMLDoc() { /* document.getElementById("my_form").submit();*/ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("kn_ze").innerHTML = this.responseText; } }; xhttp.open("GET", "prophp.php", true); xhttp.send(); } </script> </body> </html> test script to process the form data prophp.php : <?php echo '<br>test code here : '; if (isset($_POST['fname'])) { var_dump($_POST['fname']); // execute mysql queries } ?> 11) How are the form data placed in the existing function? (or should I create a second one? ) Maybe someone can help me out solving it.
  10. I am confused about the use of the <link> and <enclosure> subelements of the <item> subelement. The difference between the <link> subelements of the <channel> and <item> elements appears clear, but the difference between the <link> and <enclosure> subelements of the <item> subelement are difficult to understand. For example, if your RSS feed contained a long series of <item> subelements with each referring to a different podcast, why would you need both a <link> and <enclosure> for the same <item> subelement. <channel> <link></link> <item> <link></link> <enclosure></enclosure> </item> </channel>
  11. Hi everyone, I try to convert an XML file to a HTML page but nothing is displayed. in the following, i put the XML code, the xslt code and the HTML page. Thank you for your help. the XML code <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="fg.xsl" ?> <cuimodel> <window id='window1'> <div> <label id='label1'> searchPreference </label> <label id='label12'> seeFirst </label> <combobox id='CB1' name='criteriaCB'> <item>promotions</item> <item>BestRated </item> </combobox> </div> <div> <label id='label2'> mon </label> <label id='label21'> second </label> <combobox id='CB2' name='DispLayout'> <item>GridLayout</item> <item>listlayout</item> </combobox> </div> <div> <label id='label13'> Preference </label> <label id='label122'> see </label> <combobox id='CB3' name='CT'> <item>HighContrast</item> <item>LowContrast</item> </combobox> </div> <button>cancel</button> <button>ok</button> </window> </cuimodel> the XSLT code <?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> <xsl:for-each select="div"> <xsl:for-each select="label"> <label> <xsl:value-of select="."/> </label> <select> <xsl:for-each select="combobox"> <option> <xsl:value-of select="item"/> </option> </xsl:for-each> </select> </xsl:for-each> <xsl:for-each select="button"> <button> <xsl:value-of select="."/> </button> </xsl:for-each> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> and the HTML page
  12. Hello everyone. We have recently updated an application web based named ISOKEY for ISO documentation (a documentation manager working in IIS), in a Windows 2003 server for Small Business SP2. We had it working ok with a non SSL config in the e-mail SMTP settings, after we tried to change to gmail mails stopped from sending. So I made a smtp-relay for using port 25 (smtp) with no SSL enabled. For some reason the logging in windows says that the body is incorrect: So I was wondering if the XML where the smtp configuration is, should be updated too. I'm uploading the XML, and what I'm asking is (because I can't see an error in the body it seems everything is fine) is there any change we should do for it to work? Thank you very much in advance for any advice or tip you can give me. Best, M. xml_post.xml Edit: Since the code for the XML is kind of short, I'll post it right here for a better lecture of it. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.net> <mailSettings> <smtp deliveryMethod="Network" from="ISOKEY"> <network host="smtp-relay.gmail.com" port="25" userName="my@account.com" password="mypassword" defaultCredentials="false" /> <!-- --> </smtp> </mailSettings> </system.net> <system.diagnostics> <sources> <!-- This section defines the logging configuration for My.Application.Log --> <source name="DefaultSource" switchName="DefaultSwitch"> <listeners> <add name="FileLog"/> <!-- Uncomment the below section to write to the Application Event Log --> <!--<add name="EventLog"/>--> </listeners> </source> </sources> <switches> <add name="DefaultSwitch" value="Information"/> </switches> <sharedListeners> <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=VAR, processorArchitecture=MSIL" initializeData="FileLogWriter"/> <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --> <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> </sharedListeners> </system.diagnostics> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="IKTypes_43" publicKeyToken="VAR" culture="neutral"/> <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="IKTypes_50" publicKeyToken="VAR" culture="neutral"/> <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
  13. I'm looking for a way to display the contents of an XML file on a web page with AJAX. I rely on the w3schools "simple CD catalog application", which shows a part of the XML (author and title) and, when you click on a title, displays the details of the CD. I need, however, to be able to add sorting and filtering when displaying artist and title - it could, for instance, be sorting the titles alphabetically or apply a filter based on the year of release. XSLT doesn't seem to work with AJAX so I hope JavaScript could be the answer: Is it possible to add such functions to the application example using JavaScript - and how could it be done? I'd really be glad if someone could help.
  14. Fetch data from URL

    Hello, If i run the following code in an ASP page it loads the file (stored on local server) and outputs the text as expected; <p id="demo"></p> <button type="button" onclick="loadDoc()">Load Feed</button> <script> function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = this.responseText; } }; xhttp.open("GET", "XML_TEST.xml", true); xhttp.send(); } </script> I need to run this from a URL not a local file. The URL has the exact same data and if i run the URL in a browser i get the data displayed in XML in the browser but when i change my code to fetch the data from the URL nothing happens. <script> function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = this.responseText; } }; xhttp.open("GET", "https://test.httpapi.com/api/domains/available.xml?auth-userid=user&api-key=key&domain-name=domain&domain-name=domain2&tlds=com&tlds=co.uk", true); xhttp.send(); } </script> any ideas please how i can get this to work?
  15. I'm trying to split the elements into new elements, from this format : <CTP> <name>ABSA bank</name> <BAs.BA>bank|sector|issuer</BAs.BA> <altIDs.altID.label_altSystem>ABSB_BBG|ASB_Reuters</altIDs.altID.label_altSystem> </CTP> to this format: <CTP> <name>ABSA bank</name> <BAs> <BA>bank</BA> <BA>sector</BA> <BA>issuer</BA> </BAs> <altIDs> <aldID> <label>ABSB</label> <altSystem>BBG</altSystem> </aldID> <aldID> <label>ASB</label> <altSystem>Reuters</altSystem> </aldID> </altIDs> </CTP> What I did so far is to transform this format: <CTP> <name>ABSA bank</name> <BAs.BA>bank|sector|issuer</BAs.BA> <FAs.FA.F>dep|sec|issue</FAs.FA.F> </CTP> to this formmat : <?xml version="1.0" encoding="UTF-8"?> <CTP> <name>ABSA bank</name> <BAs> <BA>bank</BA> <BA>sector</BA> <BA>issuer</BA> </BAs> <FAs> <FA> <F>dep</F> <F>sec</F> <F>issue</F> </FA> </FAs> </CTP> Using this Code with the help of @michael.hor257k <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <!-- identity transform --> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="*[contains(name(), '.')]" name="nest"> <xsl:param name="name" select="name()"/> <xsl:param name="delimiter" select="'.'"/> <xsl:choose> <xsl:when test="contains($name, $delimiter)"> <xsl:element name="{substring-before($name, $delimiter)}" > <!-- recursive call --> <xsl:call-template name="nest"> <xsl:with-param name="name" select="substring-after($name, $delimiter)"/> </xsl:call-template> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:call-template name="tokenize"> <xsl:with-param name="name" select="$name"/> <xsl:with-param name="text" select="."/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="tokenize"> <xsl:param name="name"/> <xsl:param name="text"/> <xsl:param name="delimiter" select="'|'"/> <xsl:variable name="token" select="substring-before(concat($text, $delimiter), $delimiter)" /> <xsl:if test="$token"> <xsl:element name="{$name}" > <xsl:value-of select="$token"/> </xsl:element> </xsl:if> <xsl:if test="contains($text, $delimiter)"> <!-- recursive call --> <xsl:call-template name="tokenize"> <xsl:with-param name="name" select="$name"/> <xsl:with-param name="text" select="substring-after($text, $delimiter)"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> The tricky step that I need is how to use many delimiters and access layers and levels to write the needed XML format.
  16. Hi, I have 2 XML stored in the variable 'ad' and 'addd' respectively: Variable 'ad': <?xml version="1.0" encoding="UTF-8"?> <name> <data> <Id>003</Id> </data> <data> <Id>006</Id> </data> .... </name> And Variable 'addd': <?xml version="1.0" encoding="UTF-8"?> <name> <data> <Id>009</Id> </data> <data> <Id>005</Id> </data> ... </name> I have written a `ttt` Javascript function: function ttt(ad,addd) { var match = ad.match(/<Id\/>/); var matcht = addd.match(/<Id\/>/); if ((! match || match.length == 0) && (! matcht || match.length == 0)){ return "Below is the details of the Id of ad:\n\n" + ad.split("<Id>")[1].split("</Id>")[0]; + "\n\n And, Below is the details of the Id of addd:\n\n" +addd.split("<Id>")[1].split("</Id>")[0]; } } I need `If` `Id` is not blank from 'ad' variable then return alert as `error` with `Id` as below, otherwise not: <?xml version="1.0" encoding="UTF-8"?> <name> <data> <Id>003</Id> </data> <data> <Id>006</Id> </data> </name> And, I need `If` `Id` is not blank from 'addd' variable then return alert as `error` with `Id` as below, otherwise not: <?xml version="1.0" encoding="UTF-8"?> <name> <data> <Id>009</Id> </data> <data> <Id>005</Id> </data> </name>
  17. That I am working on?: I am generating an XML schema that controls the inclusion of a logical expression in a program. There are logical operator (https://en.wikipedia.org/wiki/Logical_connective): - Unary (now only work with not) (force MaxOccurss=1 of LOGIC_VALUES) - Binary (and,or) (force MaxOccurss=Unbounded of LOGIC_VALUES) You can see the visual schema of code: Current code, which does not have the requested functionality <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"> <xs:element name="LOGIC_EXPRESSION"> <xs:complexType> <xs:all> <xs:element name="LOGIC_OPERATOR" type="TYPE_LOGIC_OPERATOR"/> <xs:element ref="LOGIC_VALUES"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="LOGIC_VALUES"> <xs:complexType> <xs:choice> <xs:element name="LOGIC_VALUE" minOccurs="1" maxOccurs="unbounded"/> </xs:choice> </xs:complexType> </xs:element> <xs:simpleType name="TYPE_LOGIC_OPERATOR"> <xs:restriction base="xs:string"> <xs:enumeration value="and"/> <xs:enumeration value="or"/> <xs:enumeration value="not"/> </xs:restriction> </xs:simpleType> </xs:schema> What do I need? I need know: - If possible in the restriction of logic operator you can force the maxOccur of Logic_Values (dynamic change of maxoccurs to other element) - If it is possible to do, what should I use? Example of what I want You are writting the next XML code: <?xml version="1.0" encoding="UTF-8"?> <LOGIC_EXPRESSION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/media/sf_Downloads/xml/Beta.xsd"> <LOGIC_OPERATOR>not</LOGIC_OPERATOR> <LOGIC_VALUES> <LOGIC_VALUE>Variable1</LOGIC_VALUE> <LOGIC_VALUE>Variable2</LOGIC_VALUE> </LOGIC_VALUES> </LOGIC_EXPRESSION> The XML schema should detect that it is a unary operator and you should receive an error. Thaks a million
  18. Help XHTML Code

    Hi Everyone! I've been working on a project but i keep getting an error in Line 16 its says "Error parsing attribute name". I've changed the code like 10 times still get the same error. If anyone can help id really appreciate it Line 16 is the first FOR THANKS <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CECS3214 Fall 2016 - Project #2</title> <link rel = "stylesheet" type = "text/css" href = "text1.css"/> </head> <script> var radioNum = 10; var CorrectAnswer = cccdabcdab; var CompareAnswer = abcd; var radioTax = 10/radioNum; var CheckPoint = new Array(radioNum); for (i=0 ; i<radioNum; i++) { CheckPoint[i] = i*4 + CompareAnswer.indexOf(CorrectAnswer.charAt(i)); function CheckSum () { var YourScore = 0; for (i=0; i<radioNum; i++) { if (document.ANSWER.elements[CheckPoint[i]].checked == true) { YourScore += radioTax; } } MyPress = "You scored " + YourScore + " points out of 10 in this test./n"; if (YourScore == 10) { MyPress += "Excellent!!"; } else if (YourScore >= 8) { MyPress += "Very good!"; } else if (YourScore >= 6) { MyPress += "Nice effort, but you can do better!"; } else { MyPress += "Study harder!"; } alert(MyPress); return false; } } </script> <body background = "background.jpg"> <form name="ANSWER" onSubmit="return CheckSum()"> <p class="sansserif">1) Which of the following is correct to write Hello World on the webpage?</p> <table width="537" border="1"> <tbody> <tr> <th width="273"><input type="radio" name="Q1" id="a1" value="radio"/> a) System.out.println("Hello World")</th> <th width="248"><input type="radio" name="Q1" id="a2" value="radio"/> print("Hello World")</th> </tr> <tr> <th height="42"><input type="radio" name="Q1" id="a3" value="radio"/> c) document.write("Hello World")</th> <th><input type="radio" name="Q1" id="a4" value="radio"/> d) response.write("Hello World")</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">2) Which of the following statements are false for JavaScript?</p> <table width="551" border="1"> <tbody> <tr> <th width="275"><input type="radio" name="Q2" id="a5" value="radio"/> a) JavaScript can react to events</th> <th width="260"><input type="radio" name="Q2" id="a6" value="radio"/> JavaScript can read and write HTML elements</th> </tr> <tr> <th height="42"><input type="radio" name="Q2" id="a7" value="radio"/> c) JavaScript cannot be used to create cookies</th> <th><input type="radio" name="Q2" id="a8" value="radio"/> d) both b and c</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">3) Which of the following are capable of Java Script functions?</p> <table width="477" border="1"> <tbody> <tr> <th width="225"><input type="radio" name="Q3" id="a9" value="radio"/> a) Returning multiple values</th> <th width="236"><input type="radio" name="Q3" id="a10" value="radio"/> Accepting parameters and returning values</th> </tr> <tr> <th height="42"><input type="radio" name="Q3" id="a11" value="radio"/> c) Accepting parameters</th> <th><input type="radio" name="Q3" id="a12" value="radio"/> d) All of the above</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">4) Which of the following statements are true for Java Script?</p> <table width="500" border="1"> <tbody> <tr> <th width="241"><input type="radio" name="Q4" id="a13" value="radio"/> a) JavaScript is case sensitive</th> <th width="243"><input type="radio" name="Q4" id="a14" value="radio"/> JavaScript statements can be grouped together in blocks</th> </tr> <tr> <th height="42"><input type="radio" name="Q4" id="a15" value="radio"/> c) Semicolon at the end of statement is mandatory</th> <th><input type="radio" name="Q4" id="a16" value="radio"/> d) Both a and b above</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">5) If we dont want the script to write page content, under which HTML tag should the JS tag be placed?</p> <table width="510" border="1"> <tbody> <tr> <th width="216"><input type="radio" name="Q5" id="a17" value="radio"/> a) < body > area</th> <th width="278"><input type="radio" name="Q5" id="a18" value="radio"/> < head > area</th> </tr> <tr> <th height="42"><input type="radio" name="Q5" id="a19" value="radio"/> c) any of a and b</th> <th><input type="radio" name="Q5" id="a20" value="radio"/> d) none of the above</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">6) Which of the below is used in JavaScript to insert special characters?</p> <table width="416" border="1"> <tbody> <tr> <th width="182"><input type="radio" name="Q6" id="a21" value="radio"/> a) |</th> <th width="218"><input type="radio" name="Q6" id="a22" value="radio"/> \</th> </tr> <tr> <th height="42"><input type="radio" name="Q6" id="a23" value="radio"/> c) -</th> <th><input type="radio" name="Q6" id="a24" value="radio"/> d) %</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">7) Which is the correct way to write an array in JavaScript?</p> <table width="525" border="1"> <tbody> <tr> <th width="221"><input type="radio" name="Q7" id="a25" value="radio"/> a) var txt= new array(1:"arr",2:"kim",3:"jim")</th> <th width="288"><input type="radio" name="Q7" id="a26" value="radio"/> var txt= new array:1=("arr")2=("kim")3=("jim")</th> </tr> <tr> <th height="42"><input type="radio" name="Q7" id="a27" value="radio"/> c) var txt= new array("arr","kim","jim")</th> <th><input type="radio" name="Q7" id="a28" value="radio"/> d) var txt= new array="arr","kim","jim"</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">8) What is the alternate name for Java Script?</p> <table width="416" border="1"> <tbody> <tr> <th width="182"><input type="radio" name="Q8" id="a29" value="radio"/> a) LimeScript</th> <th width="218"><input type="radio" name="Q8" id="a30" value="radio"/> both a and d</th> </tr> <tr> <th height="42"><input type="radio" name="Q8" id="a31" value="radio"/> c) ECMScript</th> <th><input type="radio" name="Q8" id="a32" value="radio"/> d) ECMAScript</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">9) What is the symblo to comment out line in JavaScript?</p> <table width="416" border="1"> <tbody> <tr> <th width="182"><input type="radio" name="Q9" id="a33" value="radio"/> a) //This is a comment</th> <th width="218"><input type="radio" name="Q9" id="a34" value="radio"/> **This is a comment</th> </tr> <tr> <th height="42"><input type="radio" name="Q9" id="a35" value="radio"/> %%This is a comment</th> <th><input type="radio" name="Q9" id="a36" value="radio"/> **This is a comment**</th> </tr> </tbody> </table> <p> </p> <p class="sansserif">10) How do you create a variable x that is equal to the string "Hello"?</p> <table width="416" border="1"> <tbody> <tr> <th width="182"><input type="radio" name="Q10" id="a37" value="radio"/> a) string x = "Hello";</th> <th width="218"><input type="radio" name="Q10" id="a38" value="radio"/> var x = "Hello";</th> </tr> <tr> <th height="42"><input type="radio" name="Q10" id="a39" value="radio"/> c) text x = "Hello";</th> <th><input type="radio" name="Q10" id="a40" value="radio"/> c) strings x = "Hello";</th> </tr> </tbody> </table> <p> </p> <center> <input type=SUBMIT class="myButton" value="SUBMIT"/> <input type=RESET class="myButton" value="Erase All Answers"/> </center> </form> </body> </html>
  19. I've Been Studying XML On W3Schools,I've Arrived To The Section "XML Validator" On http://www.w3schools.com/xml/xml_validator.asp And Tried To Validate Some "Bad Formed" XML Document Like This: And When I Clicked "Check XML" This Message Appeared: Validation Isn't Working.
  20. Issue with XML table populating

    Hello. I am having an issue with my website populating an XML table. The XML table is located in the root folder and is called song_catalog.xml The webpage that has the XML table on it has the following code. It used to populate just fine then all of a sudden it stopped. I tried to fix it and could not. I have no idea what is going on. Any help is appreciated. The following is the html code from the webpage, then the XML data (or rather a portion of the data since it is a huge file, well 800kb huge) . <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/sitetemplate.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Big Mic Productions</title> <script src="js/songscript.js"></script> <style type="text/css"> <!-- .catalog_genre_head {background-color:darkGray;font-size:24pt;color:white;font-family:Impact;} .catalog_head {background-color:gray;font-size:18pt;color:white;font-family:Impact;} .catalog_row0 {background-color:lightGray;} .catalog_row1 {background-color:white;} .catalog_row_end {background-color:darkGray;} --> </style> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <!--[if lte IE 7]> <style> .content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */ ul.nav a { zoom: 1; } /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */ </style> <![endif]--> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <link href="css/sitestyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-image: url(images/dj-background3.jpg); margin-left: 30px; margin-top: 50px; margin-right: 30px; margin-bottom: 50px; } </style> </head> <body> fa <div class="container"> <div class="header" > <center> <img src="images/logo3.png" /> </center> </div> <div class="header" align="right"> <form id="form1" name="form1" method="get" action= "http://www.google.com/search"> <INPUT TYPE="hidden" name="sitesearch" value="http://bigmicproductions.net/"> <p><label for="q"> <b>Search Site</b></label> <input type="text" name="q" id="q" /> <input type="submit" name="submit" id="submit"/></p> </form> </div> <div class="sidebar1"> <a href="songlist2.html"><img src="images/logo 4.png" width="199" height="207" /></a> <p></p> <p></p> <p>~~~~~~~~~~~~~~~~~</p> <p><b>SONG SEARCH:</b> What do you want to hear at your next party? Use the search below to pick out and listen to songs! <form action="http://grooveshark.com/search" method="get" name="form1" target="_blank" id="form1"> <label for="q"><b>Search</b></label> <input type="text" name="q" id="q" /> <input type="submit" name="button" id="button" value="Submit" /> </form> </p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <!-- end .sidebar1 --></div> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="index.html">Home</a> </li> <li><a href="#" class="MenuBarItemSubmenu">Events</a> <ul> <li><a href="weddings.html">Weddings</a></li> <li><a href="parties.html">Parties</a></li> <li><a href="dances.html">Dances</a></li> <li><a href="karaoke.html">Karaoke</a></li> </ul> </li> <li><a href="songlist2.html">Song List</a> </li> <li><a href="#" class="MenuBarItemSubmenu">Clients</a> <ul> <li><a href="clientinfoform.html">Client Info</a></li> <li><a href="feedback.html">Client Feedback</a></li> </ul> </li> <li><a href="#" class="MenuBarItemSubmenu">About</a> <ul> <li><a href="aboutbigmike.html">About Big Mike</a></li> <li><a href="testimonials.html">Testimonials</a></li> </ul> </li> </ul> <p></p> </br></br></br></br></br> <h3><div class="container" align="center"><!-- InstanceBeginEditable name="EditRegion3" --><p><img src="images/logo 4.png" /> <H1><b>Song Lists</b></H1> <h3>Below you'll find a drop down list that will help you navigate your way through an enormous selection of music. These song lists will help you find any top 100 song from the past 60 years, genre-specific songs (motown, disco, 80s), or event-specific songs for your wedding (first dance, bouquet toss, father-daughter dance). If you're having trouble finding what you're looking for, just let us know. If we don't have it we will find it for your event. </h3> <P><b>Select a category to see all related songs:</b></P> <h1>Song List</h1> <form name="myform"> <div onClick="getSong(document.myform.genres.value)"> <select name="genres"> <option>Select</option> <option value="First Dance" selected="selected">First Dance</option> <option value="Top 200 Wedding Songs">Top 200 Wedding Songs</option> <option value="50s and 60s">50s and 60s</option> <option value="70s and Disco">70s and Disco</option> <option value="70s Rock">70s Rock</option> <option value="80s">80s</option> <option value="oldschool">Old School</option> <option value="2000s">2000s</option> <option value="Slow Songs">Slow Songs</option> <option value="Father/Bride Dance">Father/Bride Dance</option> <option value="Mother/Groom Dance">Mother/Groom Dance</option> <option value="Anniversary Dance">Anniversary Dance</option> <option value="Cake Cutting">Cake Cutting</option> <option value="Intro Songs">Intro Songs</option> <option value="Dollar Dance">Dollar Dance</option> <option value="Bouquet Toss">Bouquet Toss</option> <option value="Garter Removal">Garter Removal</option> <option value="Dinner Music">Dinner Music</option> <option value="Motown">Motown</option> <option value="Line and Group Dances">Line and Group Dances</option> <option value="2016">2016</option> <option value="2015">2015</option> <option value="2014">2014</option> <option value="2013">2013</option> <option value="2012">2012</option> <option value="2011">2011</option> <option value="2010">2010</option> <option value="2009">2009</option> <option value="2008">2008</option> <option value="2007">2007</option> <option value="2006">2006</option> <option value="2005">2005</option> <option value="2004">2004</option> <option value="2003">2003</option> <option value="2002">2002</option> <option value="2001">2001</option> <option value="2000">2000</option> <option value="1999">1999</option> <option value="1998">1998</option> <option value="1997">1997</option> <option value="1996">1996</option> <option value="1995">1995</option> <option value="1994">1994</option> <option value="1993">1993</option> <option value="1992">1992</option> <option value="1991">1991</option> <option value="1990">1990</option> <option value="1989">1989</option> <option value="1988">1988</option> <option value="1987">1987</option> <option value="1986">1986</option> <option value="1985">1985</option> <option value="1984">1984</option> <option value="1983">1983</option> <option value="1982">1982</option> <option value="1981">1981</option> <option value="1980">1980</option> <option value="1979">1979</option> <option value="1978">1978</option> <option value="1977">1977</option> <option value="1976">1976</option> <option value="1975">1975</option> <option value="1974">1974</option> <option value="1973">1973</option> <option value="1972">1972</option> <option value="1971">1971</option> <option value="1970">1970</option> <option value="1969">1969</option> <option value="1968">1968</option> <option value="1967">1967</option> <option value="1966">1966</option> <option value="1965">1965</option> <option value="1964">1964</option> <option value="1963">1963</option> <option value="1962">1962</option> <option value="1961">1961</option> <option value="1960">1960</option> <option value="1959">1959</option> <option value="1958">1958</option> <option value="1957">1957</option> <option value="1956">1956</option> <option value="1955">1955</option> <option value="1954">1954</option> <option value="1953">1953</option> <option value="1952">1952</option> </select> </div> </form> <div id="output"> </div> </BODY> </HTML> </p> <!-- InstanceEndEditable --> </p> <!-- InstanceBeginEditable name="EditRegion4" --> <!-- InstanceEndEditable --> <div class="footer"> <p>Copyright 2013 Big Mic Productions</p> <!-- end .footer --></div> <!-- end .container --></div> <script type="text/javascript"> var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); </script> </div> </body> <!-- InstanceEnd --></html> =================================================================================================================================================== XML TABLE <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <song id="fdance1"> <artist>K-Ci and JoJo</artist> <title>All My Life</title> <genre>First Dance</genre> </song> <song id="fdance2"> <artist>Linda Ronstadt and Aaron Neville</artist> <title>All My Life</title> <genre>First Dance</genre> </song> <song id="fdance3"> <artist>Mike Reno and Ann Wilson</artist> <title>Almost Paradise</title> <genre>First Dance</genre> </song> <song id="fdance4"> <artist>Atlantic Star</artist> <title>Always</title> <genre>First Dance</genre> </song> <song id="fdance5"> <artist>Heatwave</artist> <title>Always And Forever</title> <genre>First Dance</genre> </song> <song id="fdance6"> <artist>Lonestar</artist> <title>Amazed</title> <genre>First Dance</genre> </song> <song id="fdance7"> <artist>Jeff Healey Band</artist> <title>Angel Eyes</title> <genre>First Dance</genre> Thank you all in advance for your help.
  21. Advice about XML

    Hello guys, Can anybody tell me some practical example of xml??? I'm new with it. I know what is xml, syntax etc. but I am not so clear with using the same.... Thanks...
  22. PHP and AJAX live search

    hello im new to the website and web programming in general, im in need of assistance with your w3schools official AJAX live search tutorial, i've copied the code to the right files, livesearch.php and index.html, which are placed in my htdocs folder and the apache server is running well. I know my code has css issues but i need to fix something else, mainly this: This is my search form, located in a table, inside a div tag: After i type in a single letter this happens: The search box disappears, instead of auto completing the word as long as i type. And even these results are shown below the "A7 Embedded PC" image, even tho my form has a z-index set to 9999. This is my livesearch.php code: <?php $xmlDoc=new DOMDocument(); $xmlDoc->load("links.xml"); $x=$xmlDoc->getElementsByTagName('link'); $q=$_GET["q"]; if (strlen($q)>0) { $hint=""; for($i=0; $i<($x->length); $i++) { $y=$x->item($i)->getElementsByTagName('title'); $z=$x->item($i)->getElementsByTagName('url'); if ($y->item(0)->nodeType==1) { if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q)) { if ($hint=="") { $hint="<a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; } else { $hint=$hint . "<br /><a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; } } } } } if ($hint=="") { $response="Nema rezultata!"; } else { $response=$hint; } echo $response; ?> And this is my index.html code fragment that contains the form: <script> function showResult(str) { if (str.length==0) { document.getElementById("livesearch").innerHTML=""; document.getElementById("livesearch").style.border="0px"; return; } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("livesearch").innerHTML=xmlhttp.responseText; document.getElementById("livesearch").style.border="1px solid #A5ACB2"; } } xmlhttp.open("GET","livesearch.php?q="+str,true); xmlhttp.send(); } </script> </head> <body background="images/osnovne_slike/pozadina01.gif" vlink="#0000FF" link="#0000FF" alink="#808080" style="background-attachment: fixed"> <div align="center"> <center> <table border="0" width="990" cellspacing="0" cellpadding="0" background="images/slike_index/header_home.png"> <tr> <td width="600" height="46"> <div id="livesearch" style=" height:46px; z-index: 9996; float: right;"> <form class="form2" style=" z-index: 9999" action="livesearch.php" method="get"> <input class="input2" type="search" onkeyup="showResult(this.value)" placeholder="Pretrazi.."> </form> </div> </td> and some css for the form and input: <style> .form2 { font-family: 'Open Sans', sans-serif; vertical-align: :bottom; color:#848484; width:170spx; padding:4px 4px 4px 4px; margin:8px 5px 5px 5px; line-height: 15px; border-radius:1px; background:#f2f2f2; } ::-webkit-input-placeholder { color: #acacac;} .input2 { margin:0px 1px; border:none; background-color:#fafafa; background-repeat:no-repeat; background-size:45px 45px; background-position:left center; height:19px; width:169px; vertical-align:bottom; text-align: left; font-size:16px; border-radius:2spx; } </style> I dont know what is causing the php to display all the results at once, while the code is completely copy-pasted from w3schools website. If anyone can help me with this i'd be very grateful. UPDATE: i have placed the w3schools code in separate files and ran them in a browser using my xml document and the search is running fine, something on my website seems to be preventing the autocomplete.
  23. XML DOM Problem

    Hello and thank you all for bringing me into this forum. I would want to make a website about video games with news, articles, login system, etc., and I'm learning to make it with W3Schools. My issue is with the XML DOM. I tried to use JavaScript to add XML data (in the form of a news list) to my HTML page, so I used the following JavaScript code: var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { newsDisplay(xhttp); } }; xhttp.open("GET", "news.xml", true); xhttp.send(); function newsDisplay(xml) { var xmlDoc, maxNews, txt, titles, dates; xmlDoc = xml.responseXML; maxNews = 5; txt = ""; titles = xmlDoc.getElementsByTagName("title"); dates = xmlDoc.getElementsByTagName("date"); for (i = 0; i < maxNews; i++) { txt += '<a href="news/news_' + + '.html"><div class="news_block">' + '<div class="news_title">Noticia' + titles[i].childNodes[0].nodeValue + '</div>' + '<div class="news_date">Fecha' + dates[i].childNodes[0].nodeValue + '</div></div></a>'; } document.getElementById("news").innerHTML = txt; } Being: news.xml the file where the news come from, with the <title> and <date> tags in each of the news maxNews the number of news to show in the list (from the first ones in the XML) But when I test my web page, the console says: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. . Thank you for any help.
  24. I would like to output the first FamilyJudgement from my xml document. How do I do it? Expected output <FamilyJudgment judgmentKey="3928551"> <JudgmentEventTypeText>Custody order</JudgmentEventTypeText> </FamilyJudgment> xml document <?xml version="1.0" encoding="UTF-8"?> <CaseNotification> <CourtDecisionNotification> <TriggeredDateTime>2016-07-12T15:05:45-05:00</TriggeredDateTime> <NotificationEvent>CourtDecisionModified</NotificationEvent> <FamilyJudgment judgmentKey="3928551"> <JudgmentEventTypeText>Custody order</JudgmentEventTypeText> <JudgmentEventDate>2016-07-12</JudgmentEventDate> <Custody> <CustodyDescriptionText>Legal custody</CustodyDescriptionText> </Custody> </FamilyJudgment> <FamilyJudgment judgmentKey="3928551"> <JudgmentEventTypeText>Custody order</JudgmentEventTypeText> <JudgmentEventDate>2016-07-12</JudgmentEventDate> <Custody> <CustodyDescriptionText>Legal custody</CustodyDescriptionText> </Custody> </FamilyJudgment> </CourtDecisionNotification> </CaseNotification>
  25. I would like to use variable vCurrentPoStatus in the select statement below. The following select is not returning anything. <xsl:value-of select="Type/@Word"/> I would like to use variable vCurrentPoStatus inside this statement to get the @Word (DISMISSED). Desired output based on current xml document <NotificationEvent notificationType="ProtectionOrderInactivation" internalProtectionOrderID="11271" protectionOrderNumber="1605935" protectionOrderStatusDate="07/21/2016" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">DISMISSED</NotificationEvent> xslt code <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:mscef="courts.state.mn.us/extfun" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:if test="Integration/Case/SecurityGroup[not(contains(@Word,'SEAL'))] or not(Integration/Case/SecurityGroup)"> <xsl:call-template name="ProtectionOrderInactivation"/> </xsl:if> </xsl:template> <!-- --> <xsl:template name="ProtectionOrderInactivation"> <xsl:if test="Integration/ControlPoint='SAVE-PROTECTION-ORDER'"> <!-- Check for Dismissed --> <xsl:if test="Integration/Case/CaseType/@Word='DMA'"> <xsl:variable name="vControlPointTimestamp" select="mscef:formatDateTimeNumeric(string(/Integration/ControlPoint/@Timestamp))"/> <xsl:for-each select="Integration/ProtectionOrder[@Op='E']/Statuses/Status[((@Op='A') or (@Op='E')) and ((Type/@Word='DISMISSED'))]"> <xsl:variable name="vCurrentPoStatus" select="Statuses/Status[((@Op='A') or (@Op='E'))][mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimestampCreate))) <=$vControlPointTimestamp][1]/Type/@Word"/> <xsl:if test="$vCurrentPoStatus ='DISMISSED'"> <NotificationEvent notificationType="ProtectionOrderInactivation"> <xsl:attribute name="internalProtectionOrderID"><xsl:value-of select="../../@InternalProtectionOrderID"/></xsl:attribute> <xsl:attribute name="protectionOrderNumber"><xsl:value-of select="../../ProtectionOrderNumber"/></xsl:attribute> <xsl:attribute name="protectionOrderStatusDate"><xsl:value-of select="Date"/></xsl:attribute> <xsl:value-of select="Type/@Word"/> </NotificationEvent> </xsl:if> </xsl:for-each> </xsl:if> </xsl:if> </xsl:template> <!-- --> <msxsl:script language="JScript" implements-prefix="mscef"><![CDATA[ function formatDateTimeNumeric(sDate){ if(sDate.length==0){ return ""; } else{ var oDate=new Date(sDate); var str = oDate.getSeconds(); return "" + oDate.getFullYear().toString() + padZeroes(oDate.getMonth() + 1,2) + padZeroes(oDate.getDate(),2) + padZeroes(oDate.getHours().toString(),2) + padZeroes(oDate.getMinutes(),2) + padZeroes(oDate.getSeconds(),2); } } function fixOdysseyTimestamp(sDate){ /* Replace the ":" between seconds and miliseconds */ if(sDate.length==0){ return ""; } else{ var strParts1 = sDate.split(" "); var strTime = strParts1[1]; var strParts2 = strTime.split(":"); return strParts1[0] + " " + strParts2[0] + ":" + strParts2[1] + ":" + strParts2[2]; } } ]]></msxsl:script> </xsl:stylesheet> xml doc <Integration MessageGUID="79e1bb27-0a4d-47ec-a554-3b59c2518b89" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="IXML Case Notification Test" MessageID="96" xmlns=""> <ControlPoint Timestamp="7/21/2016 9:49:13 AM" UserID="tessing">SAVE-PROTECTION-ORDER</ControlPoint> <Case InternalID="1623057636" ID="14870832" xmlns:user="http://tylertechnologies.com"> <FiledDate>07/21/2016</FiledDate> <CaseCategory>FAM</CaseCategory> <CaseType Word="DMA">Domestic Abuse</CaseType> <SecurityGroup Word="CONFPOR">Conf - Protective Order</SecurityGroup> <ProtectionOrders> <ProtectionOrder Op="E" InternalProtectionOrderID="11271"> <Deleted>false</Deleted> <ProtectionOrderNumber>1605935</ProtectionOrderNumber> <Issued>07/21/2016</Issued> <Expiration>10/29/2016</Expiration> <Type Word="OFP">Order for Protection</Type> <Statuses> <Status Op="A"> <Current>true</Current> <Active>No</Active> <Date Op="A">07/21/2016</Date> <Type Op="A" Word="DISMISSED">Dismissed</Type> <TimestampCreate Op="A">07/21/2016 09:49:13:763</TimestampCreate> </Status> <Status> <Current>false</Current> <Active>Yes</Active> <Date>07/21/2016</Date> <Type Word="SBJOCOR">Corrected - Signed By Judicial Officer</Type> <TimestampCreate>07/21/2016 09:48:58:313</TimestampCreate> </Status> </Statuses> </ProtectionOrder> </ProtectionOrders> </Case> <Fees xmlns:user="http://tylertechnologies.com"/> <ProtectionOrder Op="E" InternalProtectionOrderID="11271" xmlns:user="http://tylertechnologies.com"> <Deleted>false</Deleted> <ProtectionOrderNumber>1605935</ProtectionOrderNumber> <Issued>07/21/2016</Issued> <Expiration>10/29/2016</Expiration> <Type Word="OFP">Order for Protection</Type> <Statuses> <Status Op="A"> <Current>true</Current> <Active>No</Active> <Date Op="A">07/21/2016</Date> <Type Op="A" Word="DISMISSED">Dismissed</Type> <TimestampCreate Op="A">07/21/2016 09:49:13:763</TimestampCreate> </Status> <Status> <Current>false</Current> <Active>Yes</Active> <Date>07/21/2016</Date> <Type Word="SBJOCOR">Corrected - Signed By Judicial Officer</Type> <TimestampCreate>07/21/2016 09:48:58:313</TimestampCreate> </Status> </Statuses> </ProtectionOrder> </Integration>
×