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 162 results

  1. 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>
  2. 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.
  3. 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?
  4. 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.
  5. 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>
  6. 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
  7. 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>
  8. 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.
  9. 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.
  10. 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...
  11. 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.
  12. 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.
  13. 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>
  14. 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>
  15. I am using a variable vPoID to determine the right ProtectionOrder. Then I am displaying that PO's @InternalProtectionOrderID. I would also like to use the same variable to get that PO's ProtectionOrderNumber. How can I use the same variable to also get ProtectionOrderNumber? I would like to modify this line to use the variable vPoID to get the ProtectionOrderNumber <xsl:attribute name="protectionOrderNumber"><xsl:value-of select="ProtectionOrderNumber"/></xsl:attribute> Expected output <NotificationEvent notificationType="ProtectionOrderHearing" internalProtectionOrderID="2552" protectionOrderNumber="1600330"/> 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="ProtectionOrderHearing"/> </xsl:if> </xsl:template> <!-- --> <xsl:template name="ProtectionOrderHearing"> <!--<xsl:if test="Integration/ControlPoint='SAVE-FAM-HEARING'">--> <xsl:if test="Integration/ControlPoint=('SAVE-FAM-HEARING') or ('SAVE-FAM-HEAR-CTS')"> <xsl:if test="Integration/Case/CaseType/@Word='DMA'"> <xsl:for-each select="Integration/Case"> <xsl:variable name="vFoundActivePO"> <xsl:for-each select="/Integration/ProtectionOrder[Deleted='false']"> <xsl:variable name="vControlPointTimestamp" select="mscef:formatDateTimeNumeric(string(/Integration/ControlPoint/@Timestamp))"/> <xsl:variable name="vCurrentPoStatus" select="Statuses/Status[mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimestampCreate))) <=$vControlPointTimestamp][1]/Type/@Word"/> <xsl:if test="($vCurrentPoStatus ='SBJO') or ($vCurrentPoStatus='SBJOCOR')">HIT</xsl:if> </xsl:for-each> </xsl:variable> <xsl:variable name="vFoundHearingTrigger"> <xsl:choose> <xsl:when test="count(Hearing[@Op='A'])>0">HIT</xsl:when> <xsl:when test="count(Hearing[@Op='D'])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (CancelledReason/@Op='E')])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (Setting/HearingDate/@Op='E')])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (Setting/CourtSessionBlock/StartTime/@Op='E')])>0">HIT</xsl:when> <xsl:when test="count(Hearing/Setting[@Op='A'])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (Setting/RescheduledType/@Op='E')])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (Setting/CancelledReason/@Op='E')])>0">HIT</xsl:when> <xsl:when test="count(Hearing[(@Op='E') and (Setting/CourtSessionBlock/StartTime/@Op='E')])>0">HIT</xsl:when> </xsl:choose> </xsl:variable> <xsl:if test="(contains($vFoundHearingTrigger,'HIT')) and (contains($vFoundActivePO,'HIT'))"> <xsl:choose> <xsl:when test="count(Hearing/Setting[not(Cancelled)])>0"> <xsl:for-each select="Hearing/Setting[not(Cancelled)]"> <!-- WK 07/19/2016--> <xsl:variable name="vCurrentTimestamp"> <xsl:value-of select="mscef:formatDateTimeNumeric(string(/Integration/ControlPoint/@Timestamp))"/> </xsl:variable> <xsl:variable name="vControlPointTimestamp" select="mscef:formatDateTimeNumeric(string(/Integration/ControlPoint/@Timestamp))"/> <!--WK 07/19/2016 variable to hold ProtectionOrders that have not been deleted--> <xsl:variable name="vPoID"> <!--WK 07/19/2016 Select all ProtectionOrder elements from the document that are not deleted--> <xsl:for-each select="//Integration/ProtectionOrder[Deleted='false']"> <xsl:variable name="vCurrentPoStatus" select="Statuses/Status[mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimestampCreate))) <=$vCurrentTimestamp][1]/Type/@Word"/> <xsl:if test="($vCurrentPoStatus ='SBJO') or ($vCurrentPoStatus='SBJOCOR')"> <xsl:value-of select="@InternalProtectionOrderID"/> </xsl:if> </xsl:for-each> </xsl:variable> <NotificationEvent notificationType="ProtectionOrderHearing"> <!--WK 07/19/2016 variable vPoID to get the right PO's attribute @InternalProtectionOrderID>--> <xsl:attribute name="internalProtectionOrderID"><xsl:value-of select="$vPoID"/></xsl:attribute> <xsl:attribute name="protectionOrderNumber"><xsl:value-of select="ProtectionOrderNumber"/></xsl:attribute> </NotificationEvent> </xsl:for-each> </xsl:when> <xsl:otherwise> <NotificationEvent notificationType="ProtectionOrderHearing"> <xsl:attribute name="internalProtectionOrderID"><xsl:value-of select="//Integration/ProtectionOrder[Deleted='false'][count(Statuses/Status[(Type/@Word='SBJO') or (Type/@Word='SBJOCOR')])>0]/@InternalProtectionOrderID"/></xsl:attribute> <xsl:attribute name="protectionOrderNumber"><xsl:value-of select="//Integration/ProtectionOrder[Deleted='false'][count(Statuses/Status[(Current='true') and ((Type/@Word='SBJO') or (Type/@Word='SBJOCOR'))])>0]/ProtectionOrderNumber"/><xsl:value-of select="//Integration/ProtectionOrder[Deleted='false'][count(Statuses/Status[(Type/@Word='SBJO') or (Type/@Word='SBJOCOR')])>0]/ProtectionOrderNumber"/></xsl:attribute> <xsl:text>NoHearings</xsl:text> </NotificationEvent> </xsl:otherwise> </xsl:choose> </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 currentDateTimeNumeric(){ var oDate=new Date(); 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 document <Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="BCA PO Notification" MessageID="82119264" xmlns=""> <ControlPoint Timestamp="7/14/2016 9:00:52 AM">SAVE-FAM-HEARING</ControlPoint> <Case> <FiledDate>07/14/2016</FiledDate> <CaseCategory>FAM</CaseCategory> <CaseType Word="DMA">Domestic Abuse</CaseType> <BaseCaseType>Civil Domestic Violence</BaseCaseType> <SecurityGroup Word="CONFPOR">Conf - Protective Order</SecurityGroup> <Active>true</Active> <Deleted>false</Deleted> <Assignment Current="true"> <AssignmentDate>07/14/2016</AssignmentDate> <TimestampCreate>07/14/2016 08:56:32:707</TimestampCreate> </Assignment> <Hearing ID="175088126" InternalHearingEventID="1734552990"> <HearingType Word="ADJ">Adjudicatory Hearing</HearingType> <HearingTypeBaseCaseCategory>Criminal</HearingTypeBaseCaseCategory> <HearingTypeBaseCaseCategory>Family</HearingTypeBaseCaseCategory> <TimestampCreate>07/14/2016 08:58:22:160</TimestampCreate> <Setting ID="25760837" InternalSettingID="1625564128" Date="07/14/2016"> <HearingDate>07/14/2016</HearingDate> <StartTime>10:00 AM</StartTime> <EndTime>11:00 AM</EndTime> <CourtSessionName>Ad-Hoc_10-FA-16-40</CourtSessionName> <CourtSessionID ID="3862219" InternalCourtSessionID="1612936893"/> <Calendar Word="10GEN">New General Carver</Calendar> <CalendarBaseCaseCategory>Criminal</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Civil</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Family</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Probate or Mental Health</CalendarBaseCaseCategory> <CourtSessionBlock InternalCourtSessionBlockID="1615773709"> <StartTime>10:00 AM</StartTime> <EndTime>11:00 AM</EndTime> </CourtSessionBlock> <TimestampCreate>07/14/2016 08:58:23:240</TimestampCreate> </Setting> </Hearing> <Hearing ID="175088128" InternalHearingEventID="1734552992" Op="A"> <HearingType Op="A" Word="OFP">Order for Protection Hearing</HearingType> <HearingTypeBaseCaseCategory>Family</HearingTypeBaseCaseCategory> <TimestampCreate Op="A">07/14/2016 09:00:52:680</TimestampCreate> <Setting ID="25760838" InternalSettingID="1625564129" Date="07/14/2016" Op="A"> <HearingDate Op="A">07/14/2016</HearingDate> <StartTime Op="A">2:00 PM</StartTime> <EndTime Op="A">3:00 PM</EndTime> <CourtSessionName>Ad-Hoc_10-FA-16-40</CourtSessionName> <CourtSessionID Op="A" ID="3862221" InternalCourtSessionID="1612936894"/> <Calendar Op="A" Word="10GEN">New General Carver</Calendar> <CalendarBaseCaseCategory>Criminal</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Civil</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Family</CalendarBaseCaseCategory> <CalendarBaseCaseCategory>Probate or Mental Health</CalendarBaseCaseCategory> <CourtSessionBlock InternalCourtSessionBlockID="1615773710"> <StartTime Op="A">2:00 PM</StartTime> <EndTime Op="A">3:00 PM</EndTime> </CourtSessionBlock> <TimestampCreate Op="A">07/14/2016 09:00:52:767</TimestampCreate> </Setting> </Hearing> </Case> <ProtectionOrder InternalProtectionOrderID="2551" xmlns:user="http://tylertechnologies.com"> <Deleted>false</Deleted> <ProtectionOrderNumber>1600329</ProtectionOrderNumber> <Type Word="EXPARTE">Ex Parte Order for Protection</Type> <Statuses> <Status> <Current>true</Current> <Active>No</Active> <Date>07/14/2016</Date> <Type Word="SUPERSEDED">Superseded</Type> <TimestampCreate>07/14/2016 09:00:25:510</TimestampCreate> </Status> </ProtectionOrder> <ProtectionOrder InternalProtectionOrderID="2552" xmlns:user="http://tylertechnologies.com"> <Deleted>false</Deleted> <ProtectionOrderNumber>1600330</ProtectionOrderNumber> <Type Word="EXPARTE">Ex Parte Order for Protection</Type> <Statuses> <Status> <Current>true</Current> <Active>Yes</Active> <Date>07/14/2016</Date> <Type Word="SBJO">Signed By Judicial Officer</Type> <TimestampCreate>07/14/2016 09:00:25:547</TimestampCreate> </Status> </Statuses> </ProtectionOrder> </Integration>
  16. I have revised my question. I would like to get the Status whose TimstampCreate matches (or closely) ControlPoint Timestamp. How do I do this with my xslt code? My xml code <?xml version="1.0" encoding="UTF-8"?> <Integration> <ControlPoint Timestamp="5/9/2016 2:34:34 PM" UserID="kuku">SAVE</ControlPoint> <ProtectionOrders> <ProtectionOrder Op="E"> <Statuses> <Status> <Date>05/09/2016</Date> <Type Word="DIS">Dismissed</Type> <TimeStampCreate>05/09/2016 14:34:48:633</TimestampCreate> </Status> <Status Op="A"> <Date Op="A">05/09/2016</Date> <Type Op="A" Word="SBJ">Signed</Type> <TimestampCreate>05/09/2016 14:34:34:737</TimestampCreate> </Status> </Statuses> </ProtectionOrder> </Integration> Expected Output something similar to this: <Statuses> <Status Op="A"> <Current>false</Current> <Date Op="A">05/09/2016</Date> <Type Op="A" Word="SBJ">Signed</Type> <TimestampCreate>20160509143434</TimestampCreate> </Status> </Statuses> I have a function to convert date time to numeric. Here is the function <xsl:value-of select=mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimeStampCreate)))"/> My xslt 1.0 code <xsl:value-of select="/Integration/ProtectionOrder/Statuses/Status/Date"/>
  17. I have a xml 1.0 document with 3 JudgmentEvent. What I would like to get as output is 1. JudgmentEvent whose parent have not been deleted. 2. JudgmentEvent that have no parent and they have not been deleted. I do not know how to do this? My output should look like this: <JudgmentEvent ID="207217600"> <JudgmentEventType>Judgment - not all parties</JudgmentEventType> <Judgment ID="3928438"/> </JudgmentEvent> <JudgmentEvent ID="207218513"> <JudgmentEventType>Adopted</JudgmentEventType> <Judgment ID="3928452"/> </JudgmentEvent> xml 1.0 code <?xml version="1.0" encoding="UTF-8"?> <Case> <JudgmentEvent InternalID="1810327075" ID="207217512" Date="05/24/2016"> <JudgmentEventType InternalID="51314" Word="JDGMULT">Judgment - not all parties</JudgmentEventType> <IssueDate>05/24/2016</IssueDate> <TimestampCreate>05/24/2016 09:32:50:837</TimestampCreate> <TimestampChange>05/24/2016 11:34:15</TimestampChange> <Deleted>true</Deleted> <AmendReason InternalID="11091" Word="CTORDER">Court Order</AmendReason> <Judgment ID="3928437" InternalID="1613120225"/> <JudgmentEvent InternalID="1810327074" ID="207217511" Date="05/24/2016"> <JudgmentEventType InternalID="13024" Word="JUDGGR">Judgment</JudgmentEventType> <IssueDate>05/24/2016</IssueDate> <AgingClockActionKey Word="SP">Stops case aging clock</AgingClockActionKey> <TimestampCreate>05/24/2016 09:32:24:447</TimestampCreate> <TimestampChange>05/24/2016 11:51:29</TimestampChange> <Deleted>false</Deleted> <Judgment ID="3928436" InternalID="1613120224"/> </JudgmentEvent> </JudgmentEvent> <JudgmentEvent InternalID="1810327167" ID="207217600" Date="05/24/2016"> <JudgmentEventType InternalID="51314" Word="JDGMULT">Judgment - not all parties</JudgmentEventType> <IssueDate>05/24/2016</IssueDate> <TimestampCreate>05/24/2016 11:51:29:377</TimestampCreate> <Deleted>false</Deleted> <AmendReason InternalID="11091" Word="CTORDER">Court Order</AmendReason> <Judgment ID="3928438" InternalID="1613120226"/> <JudgmentEvent InternalID="1810327074" ID="207217511" Date="05/24/2016"> <JudgmentEventType InternalID="13024" Word="JUDGGR">Judgment</JudgmentEventType> <IssueDate>05/24/2016</IssueDate> <TimestampCreate>05/24/2016 09:32:24:447</TimestampCreate> <TimestampChange>05/24/2016 11:51:29</TimestampChange> <Deleted>false</Deleted> <RecordingNeeded>false</RecordingNeeded> <Judgment ID="3928436" InternalID="1613120224"/> </JudgmentEvent> </JudgmentEvent> <JudgmentEvent InternalID="1810327321" ID="207218513" Date="05/25/2016"> <JudgmentEventType InternalID="12997" Word="ADOPT">Adopted</JudgmentEventType> <IssueDate>05/25/2016</IssueDate> <TimestampCreate>05/25/2016 10:35:01:210</TimestampCreate> <Deleted>false</Deleted> <Judgment ID="3928452" InternalID="1613120240"/> </JudgmentEvent> </Case>
  18. XML_Code.txtXML_Code.txtI am new to the world of XML, so need a little help on how to approach this issue. On trying to generate an XML file using an Oracle code, I obtain an incomplete XML tag at the end of the file. My guess is that the spanish content inside the XML is causing this. I have tried to change the encoding format from UTF-8 to ISO-8859-1, but the error still persisted. Here is a sample output:- HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Server: DWS/4.1 Cache-Control: no-cache Set-Cookie: JSESSIONID=2551F518D867AB17F8CA73885E7F9CA2; Path=/ Content-Type: text/XML;charset=UTF-8 Content-Length: 729 Date: Thu, 05 May 2016 12:56:37 GMT <?xml version="1.0" encoding="ISO-8859-1"?><subscriptionHistoryMA version="2.0.1"><batchAdjustmentMA><transactionId>210411850725724</transactionId><subscriberNumber>59899427796</subscriberNumber><transactionDateTime>2016-05-04T00:00:00+00:00</transactionDateTime><originNodeId>ADM_CMA</originNodeId><originNodeType>ADM</originNodeType><originTransactionId>527600</originTransactionId><transactionType>TT01</transactionType><transactionCode>ADC</transactionCode><accountStatus>10000000</accountStatus><accountGroupId>NULL</accountGroupId><externalData1>prueba á é ü N° í ñ ó ú</externalData1><externalData2>NULL</externalData2></batchAdjustmentMA></subscriptionHi This in turn causes a parsing error while trying to read the XML file through a browser, which is expected. The code used to generate this XML file is attached for reference. Any clues would be of great help. Thanks, Narayanan.XML_Code.txt
  19. What is this cod and what is it dosing? The application is called Cosmic Uppdate and consists of two parts. One part consists of client application( Cosmic uppdate client) that starts Cosmic and verifies if the new version is available. ths application runs with the user's privileges. the second Component is a windows service ( Cosmic update service) which handles the uppdate of the Cosmic client, copy the new files from the distribution dividend. How can I create that kind of application to Another Environment? a.txt
  20. hi , i folowed the tutorial on Appml : http://www.w3schools.com/appml/appml_php.asp but i am getting an error . my question is : does anyone know what is wrong with this ? if not is there a way to get more info about the error so ill try to fix it . Heres the Screen shot : Thank You
  21. Hi Guys! I have a xls file ex: 9015000000 I france I FRANCE I would like to automatically generates a txt file for each set of lines xls to have a line like this: <option value = "901500000001"> france - FRANCE </ option> Be done with xml or possible way Thanks!
  22. Thanks for looking into this issue. I am not sure, whether this is the right forum to post this thread. If not, let me know the right forum to post this thread. I have wellformed XML message. I want to produce a list/report as 1) All Xpath of XML message 2) Xpath , data content for this XPATH Here is an example (Input XML Message) <?xml version="1.0"?><PARTS><TITLE>Computer Parts</TITLE><PART><ITEM>Motherboard</ITEM><MANUFACTURER>ASUS</MANUFACTURER><MODEL>P3B-F</MODEL><COST> 123.00</COST></PART><PART><ITEM>Video Card</ITEM><MANUFACTURER>ATI</MANUFACTURER><MODEL>All-in-Wonder Pro</MODEL><COST> 160.00</COST></PART><PART><ITEM>Sound Card</ITEM><MANUFACTURER>Creative Labs</MANUFACTURER><MODEL>Sound Blaster Live</MODEL><COST> 80.00</COST></PART><PART><ITEM>inch Monitor</ITEM><MANUFACTURER>LG Electronics</MANUFACTURER><MODEL> 995E</MODEL><COST> 290.00</COST></PART></PARTS> The desired output --> I created the following XML list manually /PARTS/TITLE Computer Parts/PARTS/PART[1]/ITEM Motherboard/PARTS/PART[1]/MANUFACTURER ASUS/PARTS/PART[1]/MODEL P3B-F/PARTS/PART[1]/COST 123.00/PARTS/PART[2]/ITEM Video Card/PARTS/PART[2]/MANUFACTURER ATI............................................................... I have XMLSPY, and I do not have additional tools kit associated with XMLSPY. I tried with xml_grep in linux. It need the XPATH as input to get me the data content. I am not able to use xml_grep to extract attributes of XML message. Are there any open source product to produce such report for XML Message? What are the ways to extract XPATHs/XPATH, data content? Thanks for helping.
  23. I'm sorry for this very prosaic topic: What does exactly mean: 'scalable vector graphics'? 1 - It means that when you reduce browser's window into a smaller size, the graphic (a circle for example) reduces itself keeping its shape, avoid the overlapping of the browser's window? 2 - Or it means that the created shape on screen is gonna have a different size, relatively to the window's size? 3 - Or it's relative to the computation's value of the script that will make the shape? Sorry again (...blushing), thanks to anyone who'll reply to this unbelievable topic...
  24. I have a xml document that I would like to display **Number** from <CrossReferenceNumber> elemen. In my xslt the **Number** is inside <ext:SupersededProtectionOrderID> element. Desired output <ext:SupersededProtectionOrderID>OFP System Number</ext:SupersededProtectionOrderID> Here are the conditions: Condition one If ProtectionOrder/CrossReferenceNumbers/CrossReferenceNumber/Type = ‘OFP System Number’ and ProtectionOrders/ProtectionOrder/Statuses/Status/Type = Signed By Judicial Officer has an Op = “A” Condition two If ProtectionOrder/CrossReferenceNumbers/CrossReferenceNumber/Type = ‘OFP System Number’ and ProtectionOrders/ProtectionOrder/Statuses/Status/Type = ‘Signed By Judicial Officer – Corrected’ and has Op = ‘A’ display ProtectionOrder/CrossReferenceNumbers/CrossReferenceNumber/Number My xml <Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="BCA PO Notification" MessageID="67177928" xmlns=""> <ProtectionOrders> <ProtectionOrder Op="E" InternalProtectionOrderID="932"> <ProtectionOrderNumber>201500845</ProtectionOrderNumber> <Type Word="OFP">Order for Protection</Type> <Statuses> <Status Op="A"> <Current>true</Current> <Active>Yes</Active> <Date Op="A">09/01/2015</Date> <Type Op="A" Word="SBJO">Signed By Judicial Officer</Type> <TimestampCreate Op="A">09/01/2015 12:39:49:763</TimestampCreate> </Status> <Status> <Current>false</Current> <Active>No</Active> <Date>09/01/2015</Date> <Type Word="DRAFT">Draft</Type> <TimestampCreate>09/01/2015 12:39:43:207</TimestampCreate> </Status> </Statuses> <CrossReferenceNumbers> <CrossReferenceNumber> <Type Word="NCICNUM">NCIC Number</Type> <Number>Testing123</Number> </CrossReferenceNumber> </CrossReferenceNumbers> <TimestampCreate>09/01/2015 12:39:43:140</TimestampCreate> <TimestampChange>09/01/2015 12:39:49:750</TimestampChange> </ProtectionOrder> </ProtectionOrders> </Case> <ProtectionOrder Op="E" InternalProtectionOrderID="932" xmlns:user="http://tylertechnologies.com"> <ProtectionOrderNumber>201500845</ProtectionOrderNumber> <Type Word="OFP">Order for Protection</Type> <Statuses> <Status Op="A"> <Current>true</Current> <Active>Yes</Active> <Date Op="A">09/01/2015</Date> <Type Op="A" Word="SBJO">Signed By Judicial Officer</Type> <TimestampCreate Op="A">09/01/2015 12:39:49:763</TimestampCreate> </Status> <Status> <Current>false</Current> <Active>No</Active> <Date>09/01/2015</Date> <Type Word="DRAFT">Draft</Type> <TimestampCreate>09/01/2015 12:39:43:207</TimestampCreate> </Status> </Statuses> <CrossReferenceNumbers> <CrossReferenceNumber> <Type Word="NCICNUM">OFP System Number</Type> <Number>Testing123</Number> </CrossReferenceNumber> </CrossReferenceNumbers> </ProtectionOrder> My 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:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template name="ProtectionOrder"> <!--SupersededProtectionOrderID--> <ext:SupersededProtectionOrderID> <xsl:choose> <xsl:when test="(Statuses/Status/Type/@Op='A') and count(CrossReferenceNumbers/CrossReferenceNumber/Type='OFP System Number')>0"> <xsl:value-of select="Number"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="/Integration/ProtectionOrder[@InternalProtectionOrderID=current()/MNProtectionOrderAdditional/@SupersededProtectionOrderID]/ProtectionOrderNumber"/> </xsl:otherwise> </xsl:choose> </ext:SupersededProtectionOrderID> </xsl:template> </xsl:stylesheet>
  25. Why should i learn xml? What it is features and where it is used? What is the roll of xml in web developing?