Jump to content

Search the Community

Showing results for tags 'xml'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 182 results

  1. Hi, This is my first topic in this forum and i hope that someone can help me = = = = = = = = = XML: <?xml version="1.0" encoding="utf-8"?><gallery><description>martens-design.be</description><album title="" thumbnail=""><description></description><image src="xxxxx.jpg" thumbnail="xxxxx_thumb.jpg"></image><image src="yyyyy.jpg" thumbnail="yyyyy_thumb.jpg"></image><image src="zzzzz.jpg" thumbnail="zzzzz_thumb.jpg"></image></album></gallery> = = = = = = = = = ASP: <%Set objXMLDoc = Server.CreateObject("Microsoft.XMLDOM")objXMLDoc.async = FalseobjXMLDoc.load("http://www.absdef.com/data/MyXML.xml")Set Root = objXMLDoc.documentElementSet NodeList = Root.getElementsByTagName("gallery/album/image")For i = 0 to NodeList.length -1 Set image = objXMLDoc.getElementsByTagName("src")(i) Set thumb = objXMLDoc.getElementsByTagName("thumbnail")(i) Response.Write image.text & " " & "<br>" Response.Write thumb.text & " " & "<br>"NextSet objXMLDoc = Nothing%> = = = = = = = = = ...but i've got nothing ...and this is what i want: xxxxx.jpg xxxxx_thumb.jpg <br>yyyyy.jpg yyyyy_thumb.jpg <br>zzzzz.jpg zzzzz_thumb.jpg <br> = = = = = = = = = Thankzzz Charlotte
  2. I have a dynamic web page with an <a> where the href varies with the contents. I would like the <a> to open in a new tab instead of a new IE. So I use <a href="......." target="_blank"/> to achieve this but not always work: (1). using jsp to generate html, target="_blank" in the resulting html leads to new tab, as expected.(2). instead of jsp->html, using servlet to write xml to IE with xslt, target="_blank" in the xsl leads to new IE opened, not new tab.(3). In 2, if I view the source in IE and save the xml together with the xsl in same folder, open the xml directly with IE, target="_blank" leads to new tab, as expected. I don't know if there is any method to make (2) above also open new tab. Please help.
  3. Hello everybody, I have a little problem here...I have a XML file, that is a database itself containing information about terminology in two languages... This exemple file is to be "uploaded" into a MySQL databse, on Ubuntu, which is already built and ready to get the information from the XML files... The thing is: how can I start doing this uploading process? Is shell script a good way? Or is it better to use another tool? How? The file is here, attached. Thank you XML_exemple.mtf.xml
  4. We have a client that wants to specify both these attributes in an XML header. Is this allowed under XML specs ? An example is given below. <InvoiceImport xmlns="http://www.xxxx.com/schema/auditor/mws/invoice/" xmlns:xsi="http://www.w3.org/20...Schema-instance" xsi:noNamespaceSchemaLocation="http://www.xxxx.com/schema/auditor/mws/invoice/invoice-1.1.xsd" xsi:schemaLocation="http://www.xxxx.com/schema/auditor/mws/invoice/ http://www.xxxx.com/schema/auditor/mws/invoice/invoice-1.1.xsd">
  5. Hi everyone! I need help for transforming XML in to XHTML using XSLT. I can do everything i need in XSLT and it works on every Browser except in Google Chrome. I read that this is not a strange thing... Google do this intentionally for keep hight security level... Is this true?Are there something that I can do for resolve this problem?
  6. HiI'm kinda new to XML and coding so I dont know if this is possible...I have this XML made with Processing what it does is: It takes the feed from the webcam and when I press Space it samples color from 2 pixels in different possitions. It writes the XML like this: <?xml version="1.0" encoding="ISO-8859-1"?><COLORS><SHIRT>#959789</SHIRT><PANTS>#19100F</PANTS><SHIRT>#999486</SHIRT><PANTS>#19110D</PANTS><SHIRT>#939791</SHIRT><PANTS>#1D120F</PANTS></COLORS> So everytime I press Space it adds the Tags <SHIRT> and <PANTS>, this means that the XML is always updating What i need now is a HTML that reads the XML and puts colors in cells of a table and everytime there is a new color, it adds it to the table... Is there a way to do that? Please I've been trying this for the last 3 days with no success... Thank you
  7. I'm probably too damaged of working with C# and LinQ, so havn't done a real SQL sentance since my work in Java.I have two tables, which are combined with a PK and FK. Table_MyCust with PK CustID and Table_CustApartments which contain CustID as FK.I want to make a XML document with PHP, where there is a node for each MyCust row, and for each MyCust there is a CustApartments for each apartment that have the current CustID as FK. In C# I've do something like the following: XElement xml = new XElement("customers", from p in DatabaseConnection.Custs orderby p.CustName select new XElement("customer", new XAttribute("customerName", p.CustName), new XElement("Addresses", (from l in p.Aparts.Distinct() orderby l.Street where l.Street != null && !l.Postal.Equals("1010") select new XElement("Address", (string)l.Street); ))); But how does I do in PHP? Does you create a SQL sentance with some kind of a join operation? Or do you create two SQL statments, and check for equals on the PK and FK while running through all the rows? I'm not sure whats the 'correct' way to do in PHP, since I'm fairly new to PHP scripting yet.
  8. Hi All I have a bizzar issue which is driving me nuts. I was running a php server on my pc to test my code with no issues - now moved it to the host server and get this issue when try to parse xml: Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in /websites/123reg/LinuxPackage22/tr/ad/in/tradingbay.co/public_html/Lib/Functions.php on line 154 here is my code: $TDurl = "http://api.tradedoubler.com".$Version.$module.$Format.$TDParams.$Token;print $TDurl;$TDResponse = @file_get_contents($TDurl);$TDParsed_Xml = simplexml_load_string($TDResponse);
  9. I have a question about the XML. I will admit, I havent spent a ton of time trying to find the answer to this now because I've looked into it in the past with no luck, which is why I never really started using XML to begin with. But I feel like it would be the best option for a site I want to create, and I just need a few clarifications on how to use it.I think I understand the basic structure of an XML document, and all the tags you can create. But my question is once you create the structure, or Schema, What do you do with that to easily insert data. Say I have a simple structure like this<article><title> ABC</title><keywords> </keywords> (Question: would I have several of these tags with multiple keywords?)<summary> </summary><text> </text></article>That may or may not be right, but close enough. If I have many articles I want to post, I really don't want to have to go through and retype all the tags everytime I add something, especially if my actual data has a lot more tags. But I have yet to figure out what I use to insert the data into that format. I'm assuming I can build a form, but I'm not sure how that gets transfered. Can it be done with HTML only or do I need another language?Also, when retrieving the information from the xml file, is that straight html or something else as well? If I missed the page that explains this on the site, you can just point me in the right direction. Also, If I wanted to just pull everything except for the text itself to include on one page, and then specific articles when a linked is clicked on other pages, that can be done right? Would I have a separate page for each dataset? or is it dynamic. Meaning If i click article one, it will show article one without needing a separate file for each additional article?I am somewhat familar with sql and PHP, so that is the method I'm thinking of. I just don't think I need a full fledge database for what I'm doing. I just need to know how data gets inserted once the structure is in place. Thanks
  10. Ok, I have an interesting problem. I'm using AJAX to pull information from in an XML file. Every thing works, however, quotes are giving me issues. I have the: <SOURCE>llSay("hello world",0)</SOURCE> as one of my elements in the XML. When I pass this in my javascript to the HTML, the source ends up looking like this: <input value="x" onchange="checkState('d4', this, 'llSay(" hello world",0)' ,'its triggered by the state')"> and I need it to look like this: <input value="x" onchange="checkState('d4', this, 'llSay("hello world&quot,0)' ,'its triggered by the state')> so I tried this: <SOURCE>llSay("hello world",0)</SOURCE> and I end up with: <input value="x" onchange="checkState('d4', this, 'llSay("hello world",0)' ,'its triggered by the state')"> What can I do to the XML file to make it pass " as it. I tried \" but I end up with \" as the results.
  11. Hi guys, I have been asked to set up an affiliate site but the content is supplied as an XML feed which is protect by a username & password. Please can someone help me with the code that will allow me to access this secure feed without having to login every time? I have PHP experience but obviously at a basic level! Many ThanksNathan
  12. In the xml schema data type --> date allows date as yyyy-mm-dd format by default.How can we modify it so that it accepts yyyy/mm/dd format style instead ?
  13. HiI need to parse a SOAP response xml and display come of the nodes values in an HTML page.I have tried to do this, but it doesn't work:<!DOCTYPE html><html><body><script>if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }<!--xmlhttp.open("GET","testing.xml",false);-->xmlhttp.open("POST","http://{server}/soap/services/ICDMS_PortalFormsIntegration/Processes/LC_GetDeployedFormsList?wsdl&lc_version=9.0.0&version=1.0",true);xmlhttp.send();xmlDoc=xmlhttp.responseXML;document.write("<table border='1'>");var x=xmlDoc.getElementsByTagName("FormType");for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x.getElementsByTagName("id")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x.getElementsByTagName("name")[0].childNodes[0].nodeValue); document.write("</td></tr>"); }document.write("</table>");</script></body></html> Can anyone help? Is there a different way I need to make the SOAP endpoint call?Thanks in advance
  14. Hello everyone, I've an application which uses xml form for data entry. I was wondering if is possible to make calculation (mainly additions and subtraction)? <?xml version="1.0"?><items><item type="settings" position="label-top"/> <item type="label" label="Edit report details here." /> <item type="label" label="Date"/><item type="calendar" dateformat="%d/%m/%Y" validate="notEmpty" required="true" name="date" bind="date" label="Date" offsetLeft="15"/><item type="input" name="admin" bind="admin" label="Admin" offsetLeft="15"/> <item type="label" label="Sales"/> <item type="input" name="others" bind="others" label="Others" offsetLeft="15"/><item type="input" name="internet" bind="internet" label="Internet" offsetLeft="15"/><item type="input" name="topup" bind="topup" label="Top Up" offsetLeft="15"/><item type="input" name="phcard" bind="phcard" label="Phone Cards" offsetLeft="15"/><item type="input" name="phcalls" bind="phcalls" label="Phone Calls" offsetLeft="15"/> <item type="input" name="bustickets" bind="bustickets" label="Bus Tickets" offsetLeft="15"/> <item type="input" readonly="true" name="totalin" bind="totalin" label="Total In" offsetLeft="15"/> <item type="label" label="Expenses & Goods"/> <item type="input" name="expenses" bind="expenses" label="Expenses" offsetLeft="15"/><item type="input" name="goods" bind="goods" label="Goods" offsetLeft="15"/><item type="input" name="goodsdetails" bind="goodsdetails" label="Goods Details" offsetLeft="15"/><item type="input" readonly="true" name="balance" bind="balance" label="Balance" offsetLeft="15"/><item type="input" name="till" bind="till" label="Till" offsetLeft="15"/><item type="input" name="cash" bind="cash" label="Cash" offsetLeft="15"/><item type="input" name="debits" bind="debits" label="Debits" offsetLeft="15"/> <item type="input" readonly="tru" name="extra_short" bind="extra_short" label="Extra/Short" offsetLeft="15"/> <item type="button" xcommand="save" value="Submit" offsetTop="15"/> <item type="label" label="" offsetTop="15"/></items> What do you guys think?
  15. Hi all, This is my first question in W3Schools forum, and my question is I want to know whether it is applicable or possible to pass multiple parameter for a single attribute in xml tag?For example: <book name="Need" name="Help" price="10$"/><book name="Soon" name="Plz" price="20$/>...... Is it applicable? I know it may sound silly but if it is not possible then I'll go for any other option that may exist.So plz help me ASAP. Thanks in advance.
  16. I apologize if this is the wrong forum, just wasn't sure where to put this question. I'm trying to return the url from this onclick node: <a onclick=”javascript:getURLWin(‘http://some.web.url/some/path/index.html’); href=”javascript:void(0);”>; here is the block of text which describes the page </a> So far, I've tried td[2]/a/[@onclick=”javascript:getURLWin(‘”;] , and that hasn't worked. Can anyone offer suggestions? Thanks
  17. Hi to all, I need a little help about understating SOAP and xml shema. Client who is sending me some data send as shema.xsd in which all xml attributes are defined. As this is .xsd file I do not know if this goes for soap communication. I have made a parser in php which parse me all attributes and save it to mysql. First I was having a problem because I did not get any body attributes in http post ($_POST, I just get head, where was few SOAP parameters). I have to do it like: soap_response = file_get_contents('php://input'); Ok, now I get all parameter and my apache sends 200 OK. Problem is that on other side my client gets: ServerWsError [Could not create message from InputStream: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?] Where could be a problem? This is my
  18. i am parsing through xml and want to know when i am at the end of a given 'Product' object ie when at </Product> he is my code $ParsedXml = simplexml_load_string($response); foreach($ParsedXml->Product as $current)( if (isset($current->name)) ( $name = $current->name, ) ...etc... ) I want to know when i am at the end of that Product object so i can write a line into a dabase before going through to the next one
  19. Hi, Just a quick question. In all the tutorials I've seen about xml/xslt, the xsl file is always saved in the same directory as the xml file. My question is; can I have an xml file that links to an xsl file that is saved somewhere else and have it linked via a url? What I'm specifically trying to do is have an xml file and an xsl file saved in a Dropbox folder and link the xml file to the xsl file with a url. It would look like this; xslt file would be the usual; <?xml version= "1.0"?><xsl:stylesheet version= "1.0"xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"> And xml file; <?xml version= "1.0"?><?xsl-stylesheet type= "text/xsl" href= "http://dl.dropbox.com/u/name_of_file.xsl"?> I have tried this and it doesn't seem to work but I wasn't sure if that had something to do with it being in a Dropbox folder or if both documents absolutely have to be in saved in the same folder in the same directory. Thanks.
  20. I would like to extract data from Associated Press files and put them in tabular form for my work at a newspaper. I understand how to extract data when the nodes are obvious such as: <booklist>, <author>, but the files from the AP contain just <table>, <th>, <tr>, <td>, and I can't seem to extract the data. The file format is called NITF XML. I want to put them in a similar style table that would be printed in a newspaper. Can anyone help me with this? Thank you! Here is an sample file as it appears when downloaded from their wire: <nitf xmlns="http://ap.org/schemas/03/2005/nitf"> <head> <meta name="ap-transref" content="s0225" /> <meta name="ap-origin" content="dss" /> <meta name="ap-selector" content="-----" /> <meta name="ap-category" content="s" /> <meta name="ap-format" content="at" /> <!-- Routing Type="Passcode" Expanded="true" Outed="false" --> <meta name="ap-routing" content="s,s1,sag" /> <meta name="ap-cycle" content="BC" /> <meta name="ap-xhl" content="BBO--Baseball Expanded Glance" /> <docdata> <doc-id regsrc="AP" /> <del-list> <from-src level-number="s0225" /> </del-list> <urgency ed-urg="3" /> <date.issue norm="2012812TZ" /> <du-key key="BC-BBO--Baseball Expanded Glance" /> <doc.rights owner="http://www.ap.org" agent="http://license.icopyright.net" type="none" /> <doc.copyright /> </docdata> </head> <body> <body.head> <hedline> <hl1>Baseball Expanded Standings</hl1> <byline>The Associated Press<byttl></byttl></byline> </hedline> <distributor>The Associated Press</distributor> </body.head> <body.content> <block> <table> <tr> <th>AMERICAN LEAGUE</th> </tr> <tr> <th>East Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>New York</td> <td>67</td> <td>46</td> <td>.593</td> <td>—</td> <td>—</td> <td>7-3</td> <td>W-4</td> <td>34-22</td> <td>33-24</td> </tr> <tr> <td>Tampa Bay</td> <td>61</td> <td>52</td> <td>.540</td> <td>6</td> <td>—</td> <td>8-2</td> <td>W-5</td> <td>32-27</td> <td>29-25</td> </tr> <tr> <td>Baltimore</td> <td>61</td> <td>53</td> <td>.535</td> <td>6½</td> <td>½</td> <td>6-4</td> <td>L-1</td> <td>29-28</td> <td>32-25</td> </tr> <tr> <td>Boston</td> <td>56</td> <td>59</td> <td>.487</td> <td>12</td> <td>6</td> <td>3-7</td> <td>L-1</td> <td>29-34</td> <td>27-25</td> </tr> <tr> <td>Toronto</td> <td>53</td> <td>60</td> <td>.469</td> <td>14</td> <td>8</td> <td>2-8</td> <td>L-5</td> <td>28-25</td> <td>25-35</td> </tr> <tr> <th>Central Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>Chicago</td> <td>61</td> <td>51</td> <td>.545</td> <td>—</td> <td>—</td> <td>6-4</td> <td>L-1</td> <td>31-26</td> <td>30-25</td> </tr> <tr> <td>Detroit</td> <td>61</td> <td>53</td> <td>.535</td> <td>1</td> <td>½</td> <td>7-3</td> <td>L-1</td> <td>33-23</td> <td>28-30</td> </tr> <tr> <td>Cleveland</td> <td>53</td> <td>61</td> <td>.465</td> <td>9</td> <td>8½</td> <td>3-7</td> <td>W-1</td> <td>30-28</td> <td>23-33</td> </tr> <tr> <td>Kansas City</td> <td>49</td> <td>64</td> <td>.434</td> <td>12½</td> <td>12</td> <td>6-4</td> <td>W-1</td> <td>21-32</td> <td>28-32</td> </tr> <tr> <td>Minnesota</td> <td>49</td> <td>64</td> <td>.434</td> <td>12½</td> <td>12</td> <td>5-5</td> <td>L-3</td> <td>23-34</td> <td>26-30</td> </tr> <tr> <th>West Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>Texas</td> <td>66</td> <td>46</td> <td>.589</td> <td>—</td> <td>—</td> <td>7-3</td> <td>W-1</td> <td>35-22</td> <td>31-24</td> </tr> <tr> <td>Oakland</td> <td>61</td> <td>52</td> <td>.540</td> <td>5½</td> <td>—</td> <td>5-5</td> <td>W-1</td> <td>34-26</td> <td>27-26</td> </tr> <tr> <td>Los Angeles</td> <td>60</td> <td>54</td> <td>.526</td> <td>7</td> <td>1½</td> <td>3-7</td> <td>L-1</td> <td>31-23</td> <td>29-31</td> </tr> <tr> <td>Seattle</td> <td>52</td> <td>63</td> <td>.452</td> <td>15½</td> <td>10</td> <td>4-6</td> <td>W-1</td> <td>25-29</td> <td>27-34</td> </tr> </table> <p>___</p> <table> <tr> <th>NATIONAL LEAGUE</th> </tr> <tr> <th>East Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>Washington</td> <td>71</td> <td>43</td> <td>.623</td> <td>—</td> <td>—</td> <td>9-1</td> <td>W-8</td> <td>32-22</td> <td>39-21</td> </tr> <tr> <td>Atlanta</td> <td>66</td> <td>47</td> <td>.584</td> <td>4½</td> <td>—</td> <td>7-3</td> <td>W-3</td> <td>32-26</td> <td>34-21</td> </tr> <tr> <td>New York</td> <td>54</td> <td>60</td> <td>.474</td> <td>17</td> <td>9½</td> <td>4-6</td> <td>L-2</td> <td>27-30</td> <td>27-30</td> </tr> <tr> <td>Miami</td> <td>52</td> <td>62</td> <td>.456</td> <td>19</td> <td>11½</td> <td>4-6</td> <td>W-1</td> <td>28-28</td> <td>24-34</td> </tr> <tr> <td>Philadelphia</td> <td>51</td> <td>62</td> <td>.451</td> <td>19½</td> <td>12</td> <td>5-5</td> <td>L-1</td> <td>25-33</td> <td>26-29</td> </tr> <tr> <th>Central Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>Cincinnati</td> <td>68</td> <td>46</td> <td>.596</td> <td>—</td> <td>—</td> <td>5-5</td> <td>W-2</td> <td>36-20</td> <td>32-26</td> </tr> <tr> <td>Pittsburgh</td> <td>63</td> <td>50</td> <td>.558</td> <td>4½</td> <td>—</td> <td>4-6</td> <td>L-3</td> <td>35-20</td> <td>28-30</td> </tr> <tr> <td>St. Louis</td> <td>62</td> <td>52</td> <td>.544</td> <td>6</td> <td>1½</td> <td>6-4</td> <td>W-1</td> <td>34-23</td> <td>28-29</td> </tr> <tr> <td>Milwaukee</td> <td>51</td> <td>61</td> <td>.455</td> <td>16</td> <td>11½</td> <td>5-5</td> <td>L-2</td> <td>33-26</td> <td>18-35</td> </tr> <tr> <td>Chicago</td> <td>44</td> <td>68</td> <td>.393</td> <td>23</td> <td>18½</td> <td>1-9</td> <td>L-2</td> <td>28-26</td> <td>16-42</td> </tr> <tr> <td>Houston</td> <td>38</td> <td>77</td> <td>.330</td> <td>30½</td> <td>26</td> <td>3-7</td> <td>W-2</td> <td>27-31</td> <td>11-46</td> </tr> <tr> <th>West Division</th> </tr> <tr> <th></th> <th>W</th> <th>L</th> <th>Pct</th> <th>GB</th> <th>WCGB</th> <th>L10</th> <th>Str</th> <th>Home</th> <th>Away</th> </tr> <tr> <td>San Francisco</td> <td>62</td> <td>52</td> <td>.544</td> <td>—</td> <td>—</td> <td>6-4</td> <td>W-1</td> <td>33-24</td> <td>29-28</td> </tr> <tr> <td>Los Angeles</td> <td>61</td> <td>53</td> <td>.535</td> <td>1</td> <td>2½</td> <td>5-5</td> <td>L-1</td> <td>33-25</td> <td>28-28</td> </tr> <tr> <td>Arizona</td> <td>57</td> <td>57</td> <td>.500</td> <td>5</td> <td>6½</td> <td>4-6</td> <td>L-2</td> <td>30-26</td> <td>27-31</td> </tr> <tr> <td>San Diego</td> <td>51</td> <td>64</td> <td>.443</td> <td>11½</td> <td>13</td> <td>7-3</td> <td>W-6</td> <td>27-30</td> <td>24-34</td> </tr> <tr> <td>Colorado</td> <td>41</td> <td>70</td> <td>.369</td> <td>19½</td> <td>21</td> <td>4-6</td> <td>L-1</td> <td>21-37</td> <td>20-33</td> </tr> </table> <p>___</p> <table> <tr> <th>AMERICAN LEAGUE</th> </tr> <tr> <th>Saturday's Games</th> </tr> </table> <p>N.Y. Yankees 5, Toronto 2</p> <p>Cleveland 5, Boston 2</p> <p>Kansas City 7, Baltimore 3</p> <p>Oakland 9, Chicago White Sox 7</p> <p>Tampa Bay 4, Minnesota 2</p> <p>Texas 2, Detroit 1</p> <p>Seattle 7, L.A. Angels 4</p> <table> <tr> <th>Sunday's Games</th> </tr> </table> <p>Boston at Cleveland, 1:05 p.m.</p> <p>N.Y. Yankees at Toronto, 1:07 p.m.</p> <p>Kansas City at Baltimore, 1:35 p.m.</p> <p>Oakland at Chicago White Sox, 2:10 p.m.</p> <p>Tampa Bay at Minnesota, 2:10 p.m.</p> <p>Detroit at Texas, 3:05 p.m.</p> <p>Seattle at L.A. Angels, 3:35 p.m.</p> <table> <tr> <th>Monday's Games</th> </tr> </table> <p>Texas (Dempster 1-0) at N.Y. Yankees (Undecided), 7:05 p.m.</p> <p>Chicago White Sox (Peavy 9-8) at Toronto (Villanueva 6-2), 7:07 p.m.</p> <p>Detroit (A.Sanchez 1-2) at Minnesota (Deduno 3-0), 8:10 p.m.</p> <p>Cleveland (Masterson 8-10) at L.A. Angels (C.Wilson 9-8), 10:05 p.m.</p> <p>Tampa Bay (Cobb 6-8) at Seattle (Beavan 7-6), 10:10 p.m.</p> <table> <tr> <th>Tuesday's Games</th> </tr> </table> <p>Boston at Baltimore, 7:05 p.m.</p> <p>Texas at N.Y. Yankees, 7:05 p.m.</p> <p>Chicago White Sox at Toronto, 7:07 p.m.</p> <p>Detroit at Minnesota, 8:10 p.m.</p> <p>Oakland at Kansas City, 8:10 p.m.</p> <p>Cleveland at L.A. Angels, 10:05 p.m.</p> <p>Tampa Bay at Seattle, 10:10 p.m.</p> <p>___</p> <table> <tr> <th>NATIONAL LEAGUE</th> </tr> <tr> <th>Saturday's Games</th> </tr> </table> <p>Cincinnati 4, Chicago Cubs 2</p> <p>San Francisco 9, Colorado 3</p> <p>Houston 6, Milwaukee 5, 10 innings</p> <p>San Diego 5, Pittsburgh 0</p> <p>St. Louis 4, Philadelphia 1</p> <p>Atlanta 9, N.Y. Mets 3</p> <p>Miami 7, L.A. Dodgers 3</p> <p>Washington 6, Arizona 5</p> <table> <tr> <th>Sunday's Games</th> </tr> </table> <p>L.A. Dodgers at Miami, 1:10 p.m.</p> <p>San Diego at Pittsburgh, 1:35 p.m.</p> <p>St. Louis at Philadelphia, 1:35 p.m.</p> <p>Milwaukee at Houston, 2:05 p.m.</p> <p>Cincinnati at Chicago Cubs, 2:20 p.m.</p> <p>Colorado at San Francisco, 4:05 p.m.</p> <p>Washington at Arizona, 4:10 p.m.</p> <p>Atlanta at N.Y. Mets, 8:05 p.m.</p> <table> <tr> <th>Monday's Games</th> </tr> </table> <p>L.A. Dodgers (Harang 7-7) at Pittsburgh (Karstens 4-2), 7:05 p.m.</p> <p>Philadelphia (Hamels 12-6) at Miami (Eovaldi 3-7), 7:10 p.m.</p> <p>San Diego (Stults 2-2) at Atlanta (Minor 6-8), 7:10 p.m.</p> <p>Houston (Galarraga 0-2) at Chicago Cubs (Samardzija 7-10), 8:05 p.m.</p> <p>Milwaukee (Fiers 6-4) at Colorado (Francis 3-4), 8:40 p.m.</p> <p>Washington (G.Gonzalez 14-6) at San Francisco (Vogelsong 10-5), 10:15 p.m.</p> <table> <tr> <th>Tuesday's Games</th> </tr> </table> <p>L.A. Dodgers at Pittsburgh, 7:05 p.m.</p> <p>N.Y. Mets at Cincinnati, 7:10 p.m.</p> <p>Philadelphia at Miami, 7:10 p.m.</p> <p>San Diego at Atlanta, 7:10 p.m.</p> <p>Houston at Chicago Cubs, 8:05 p.m.</p> <p>Arizona at St. Louis, 8:15 p.m.</p> <p>Milwaukee at Colorado, 8:40 p.m.</p> <p>Washington at San Francisco, 10:15 p.m.</p> <p /> </block> </body.content> <body.end /> </body></nitf>
  21. Hi, I noticed in the tutorials that it explains how to use xslt as stylesheets for an xml document. And while it talks about how to get various components to display depending on what parameters you put on them (being greater than, less than something) or getting them to show up in a table, it doesn't seem to touch on how to actually format the content (like what colour to display the font in). Is changing the font colour of an xml element something I can do with xslt? What I'm trying to do is import xml element contents into an html page (specifically a <div> on an html page) but because the background colour of the page is black, I the font of the element contents needs to be white. So, can I make an xml that links to an xslt that says to change the font to white and then import the xml elements into the html document? Would that work? I realize all this can be difficult to answer without seeing the code and that can be provided if necessary. Thank you.
  22. Hi, I quite enjoy learning with w3schools but one thing that frustrates me while trying to learn is that in the examples, if there is an outside source referenced in the code (the xml tutorial for example), it is not shown in the examples. The xml tutorials tell me that I can pull info from an xml document into an html document and it gives me the html code that references an xml document located somewhere on the w3schools servers. The problem I have is that I want to see the xml document, too, so I can see exactly how the two interact with each other. So, I suggest that if tutorials reference outside documents in the html code (or if a schema is referenced in an xml document, etc.) please show both documents so that it is easier to understand how they interact with each other. Thanks.
  23. Knowing several languages but rusty with javascript, I know how there can be pitfalls in learning bad habits or coming up with convoluted, less than optimal solutions that would make more sense in other languages, almost abusing the language rather than working off of what it does best. So I am wondering if anything is unoptimal with the code below. The xml file is being read in; the code expects a 'featurelist' tag where 'ideas' and 'chapters' are organised under other chapters (except the top-level ones). Right now the code doesn't acknowledge the idea tags, it just tries to render the chapters in a html 'table of contents' in a tree-like organisation. The outputted html is correct, but I inserted some extra code to skip tags of the wrong id. This is the particular hot-spot where I'm wondering if better solutions are available, perhaps built-in rather than writing it 'by hand'. <script type="text/javascript">function processxml(xmldoc) { i = 0; root = xmldoc.getElementsByTagName("featurelist")[0]; el = root.getElementsByTagName("chapter")[0]; /* Initiate contents */ str = '<ul id="contents">'; while(el && el != root) { if(c=el.getAttributeNode("htmlclass")) str += '<div id="' + c.value + '">'; str += "<li>" + el.getAttribute("title") +"</li>"; if((els = el.getElementsByTagName("chapter")).length) { /* Has child chapters */ str += "<ul>"; el = els[0]; continue; } esc = 0; while(!esc) { save = el; while((el = el.nextSibling) && el.nodeName != "chapter") ; if(!el) { /* No next sibling */ str += "</ul>"; el = save; while((el = el.parentNode) && el.nodeName != "chapter") ; if(!el) /* No parent */ break; else /* Found parent, look again for sibling */ continue; } else { /* We have next sibling */ if(c) str += "</div>"; esc = 1; } } } /* Terminate contents */ str += "</ul>"; alert(str);// document.write(str); document.body.innerHTML = str;} Or have I done everything as well as it could be done?
  24. Hello! So, first off I'm not really a "real" programmer. I handle a lot of tech stuff at the company I'm with though, and I'm pretty good at dabbling. I usually figure out how to do what I need to do when I need to do it, and I rarely can't figure things out! I know plenty of HTML, how to work with CSS style sheets, all kinds of fancy Excel formulas, a bit of XML etc. (Note there are a few tweaks to this post that might not seem to "flow well" with the rest as I've posted it elsewhere first and didn't get much back, but I have figured our a few more things) Sooo, the thing is, I now kind of need to figure out something new, and it's a little more in depth than other things I've tried to do in the past and I'm not sure the best way to go about it. So here's the score. I work for a record label, and we provide metadata for album releases to numerous sites in XML. We've been doing this for years, and the way most XML files display in Grid mode in Stylus has made it so easy to just copy and paste from Excel I've never seen the need to figure out a "proper" or more automated system. In the long haul I probably should have because it would have saved time in the long run, but we really custom tailor our XML to each sites system to optimize it, which requires a human touch anyway. Enter a new site we're delivering directly to. Their XML is very complicated and lethargic. There's a lot of duplicated data in different tags that shouldn't really exist, but are required. It's to the point of ridiculousness really. It'd be waaay too much work to manually enter things. So I started looking for a solution to automate it. I have kind of found a way. Basically I used Stylus to convert a CSV for an album to XML that looks like this <root> <fieldnames> <UPC>UPC</UPC> <catalog>Catalog Number</catalog> <tracknumber>Track Number</tracknumber> <release>Release Date</release> <albumtitle>Title</albumtitle> <artist>Artist</artist> <tracktitle>Track Title</tracktitle> <isrc>ISRC USM2U</isrc> <description>Description</description> <time1>Track Times</time1> <field>Source Master</field> <field>Notes</field> <field>Song Writers</field> </fieldnames> <Row> <UPC>XXXXXXXXX</UPC> <catalog> CD119</catalog> <tracknumber>01</tracknumber> <release>4/10/2003</release> <albumtitle>XXXXXXXXXX</albumtitle> <artist>YYYYYYYYYYYYY</artist> <tracktitle>ZZZZZZZZZZZZ</tracktitle> <isrc>XXXXXXXXXX</isrc> <time1>2:49</time1> <time2>0:02:49</time2> <time3>169</time3> <field>169000</field> </Row> Then that repeats for all tracks Then I found Xquery code { let $doc := . for $v in $doc//root/Row, $a in $doc//root/Row/tracknumber/text() where matches($a, '01') and $v/tracknumber/text() = $a return $v/UPC/text() } Which can pull data from whatever field based off of the track number. This would allow it to pull the track name, track time, etc on a per track basis. So in essence I could setup <File> <FileName>{ let $doc := . for $v in $doc//root/Row, $a in $doc//root/Row/tracknumber/text() where matches($a, '2') and $v/tracknumber/text() = $a return $v/UPC/text() }_01_01_FLAC.flac</FileName> <FilePath>resources</FilePath> <HashSum> <HashSum>CHECKSUM SONG 01</HashSum> <HashSumAlgorithmType>MD5</HashSumAlgorithmType> </HashSum> </File> Etc for each field that would pull the appropriate data in a query that features the actual XML in there as well, so the end result of a full query would be a valid XML document. The downside is that I have to have a manual set of XML code like the above in each spot where I need to fill something. If I created a query with say 30 tracks it would be enough to always auto fill all our albums, because they have less than 30 tracks... Except it would also leave a bunch of XML with empty fields if there were less than 30 tracks. So I'm wondering 2 things. Should I even use Xquery. It really seems like a ghetto way of going about this, especially because of having to manually create a CSV and import that album by album. (Addition, I did try to make one big CSV with the whole database, and then make it filter by using the UPC and the track number, problem is it returns the correct data I'm looking for... Once for every time a track 01 appears in the database! I can't find a way to make it only return it once, and it's maddening! If I could figure that out it might be workable in Xquery) If not, what should I use? We have Access, and MS SQL floating around. It seems like if I could get similar functionality as far as kicking out text out of either of those that alone would advance the cause considerably since they natively handle Excel files. Especially if I could make it automatically recognize when the UPC field changed in a single big long Excel spreadsheet but kick out separate text (XML) documents. As far as if Xquery is a valid way of going about this, can I embed the actual XML code portion in an "if then" sort of situation where it would NOT create data in the final query result if the track number didn't exist in the source XML created from the CSV? Or is there no way to include straight XML inside of code like that? ( Addition It seems like I should be able to use something like this return <video year="{$v/year}"> {$v/title} </video> within the code, which is something I found online. But it seems to always break when I try putting large amounts of XML in there. What are the rules for what can or can't go inside the code space?) If that is possible, I think even the ghetto Xquery way would be workable, otherwise there will be a lot of manual deletion in this big complex XML document that will have to be deleted out. That would still be easier than doing it completely manually, but certainly not optimal. As far as Access or SQL... I've never done anything much in there, but have worked with people who have done all kinds of awesome stuff with them. I know that SQL especially can create all of kinds of text being populated from spreadsheets, and honestly the code has to be so stupidly easy I know I'm going to want to shoot myself when I finally figure it out. It seems to me like there must be some kind of way to make one of them generate the XML tag I need, then pull from a particular field in a spreadsheet that's in the system, and only do it until the data ends or it reaches a new UPC in the spreadsheet. Perhaps create a separate table with all the XML start tags and end tags, so it's actually pulling everything from certain fields in spreadsheets to create the final product? I know this is a bit long winded, so sorry for that. I should have been a Russian novelist And I'm sure this is pretty novice stuff, but I've found programmers are usually quite willing to help in the past. Since this must be pretty simple, I'm hoping I can figure this out and permanently expand my bag of tricks! All I really need is a way to auto pull fields based on perhaps a UPC/track number combo, and have it end when data stops. I could even set this up for all the other sites we deliver to and streamline things even more! Any thoughts or suggestions are welcome, and thank all of you in advance for your help!!!
  25. help me create an XML Sample Data TV Guide XML Languagei have the page and i am having problem on how to start ithttp://www.tvguide.com/Listings/You can omit the advertising elements
  • Create New...