Jump to content

Search the Community

Showing results for tags 'xml'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. 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
  2. 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
  3. 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
  4. 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.
  5. 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>
  6. 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.
  7. 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.
  8. 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?
  9. 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!!!
  10. 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
  11. Hi Guys, I'm a complete newbie here and have little to no experience with css, xml, javascript etc. however am now starting to teach myself. For this w3school seems to be a great place. I have a site currently that i am building however am looking for some help. I am interested in taking an XML feed from another site (betting odds) and several other different sites and feeding them onto my site. Basically to try and create an odds comparison area. I know this is me going in at the deep end but i sometimes find this is the easiest way to learn, if anyone is willing to help and guide me. Thanks, Simon.
  12. Can someome please give me a dummy script that reads a data from a multilvel XML and parses it using Javascript and displays it in the html page. The catch is :- You are not allowed to use getElementByName and getElementById, etc... Only nodeType, childnode and other such attribuit is allowed.Please assist me here.
  13. My XML knowledge is fairly terrible, but I have an XML issue that someone may have an easy option for processing this. I have an XML document that maps kinda like this: <mediawiki> <siteinfo> <sitename></sitename> <base></base> <generator></generator> <case></case> <namespaces> <namespace></namespace> </namespaces> </siteinfo> <page> <title></title> <id></id> <revision> <id></id> <timestamp>2011-03-23T11:55:10Z</timestamp> <contributor> <username></username> <id></id> </contributor> <comment></comment> <text></text> </revision> <revision> <id></id> <timestamp>2011-03-23T11:57:00Z</timestamp> <contributor> <username></username> <id></id> </contributor> <comment></comment> <text></text> </revision> </page></mediawiki> So what I was wanting to do is remove the <revision></revision> based upon the date in the <timestamp></timestamp> for each revision instance. (A particular page will have numerous revisions but each revision has a unique timestamp). The timestamp is always in that format but to keep it simple I was just going to sweep everything pre 2010 from the XML. The second thing I was wanting to do was split the file so that each <page></page> was in individual xml files. (That's a nice to have rather than a have As we're looking at excess of 10,000 pages with some pages having excess of 100 revisions, obviously going through the XML manually to do this is a bit of a nightmare. What I was looking for was a way to do this via automation. Does anyone know of an effective way to do this?
  14. Need an xslt to convert xml into json.I have a xml file which is having 3 attributes.The value in the 3rd attribute is another xml file.I need an xslt which can read the value of the 3rd attribute as another xml (not just a value) and can convert it into json format. <?xml version="1.0"?> <ResultSet> <attribute1>123</attribute1> <attribute2>456</attribute2> <attribute3> <?xml version="1.0"?> // Need this xml (i.e. value of third attribute) to be converted into Json <NewResultSet> <rowset> <node1>111</node1> <node2>222</node2> </rowset> <rowset> <node1>333</node1> <node2>444</node2> </rowset> </NewResultSet> </attribute3> </ResultSet>
  15. I created a schedule that imports table data from MSaccess database to MySql database a XML file is automatically created. Now in the XML file the function updates data by automatically recreating the table. Is there any way to update the new data by not deleting the table?here is my code: <?xml version="1.0" encoding="UTF-8" ?>- <job version="8.1">- <odbcimport>- <source> <host>localhost</host> <user>root</user> <pwd>admin</pwd> <port>3306</port> <ssl>0</ssl> <sslauth>0</sslauth> <clientkey /> <clientcert /> <cacert /> <cipher /> <charset /> <database>main_data</database> </source>- <dsn type="access"> <name>E:\Main_Data.mdb</name> <user>admin</user> <pwd>pass</pwd> </dsn>- <import source="query"> <query>select * from "AC_Group"</query> <table>ac_group</table> </import> <export target="data" />- <tables all="no">- <table source="Result" target="ac_group" type="MyISAM" index="no" foreignkey="no"> <ddl onconflict="recreate" /> <dml import="yes" onconflict="update" />- <triggers> <delete>no</delete> </triggers>- <columns>- <column> <source>ID</source> <target>id</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>yes</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Mach_No</source> <target>mach_no</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Dept_Name</source> <target>dept_name</target> <type>varchar</type> <length>255</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Group_No</source> <target>group_no</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Group_Say</source> <target>group_say</target> <type>varchar</type> <length>200</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_1</source> <target>time_1</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_2</source> <target>time_2</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_3</source> <target>time_3</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_4</source> <target>time_4</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column>- <column> <source>Time_5</source> <target>time_5</target> <type>int</type> <length>10</length> <default /> <primary>no</primary> <binary>no</binary> <notnull>no</notnull> <unsigned>no</unsigned> <autoincr>no</autoincr> <zerofill>no</zerofill> </column> </columns> </table> </tables> <abortonerror>no</abortonerror> <sendreport send="no" /> </odbcimport> </job>
  16. I am trying to write a document which could help in filtering data from another XML document. E.g. <filter> <what> <include> <marital_staus/> <ms>single</ms> <!--nog = no of groups--> <include> <memberofgroups/> <gn>Football club</gn> <!--user is a member of this club--> </include> </include> </what></filter> What I want this code to do is to choose, first, the users who are members of Football club, and then out of those, chose the users who are single. But I cannot figure out how to write a stylesheet for this. I wrote this: <xsl:template name="temp"> <xsl:param name="a1"/> <xsl:param name="pro"/> <xsl:choose> <xsl:when test="$op = 'marital_status'"> <xsl:for-each select="/document/users/user"> <xsl:if test="marital_status=$a1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:when> <xsl:when test="$op = 'memberofgroups'"> <xsl:for-each select="/document/users/user"> <xsl:for-each select="./groups/member_of_group"> <xsl:if test=".=$a1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="include"> <xsl:call-template name="temp"> <xsl:with-param name="a1"> <xsl:apply-templates select="*[2]"/> </xsl:with-param> </xsl:call-template> </xsl:template> While calling the template I pass the correct values I suppose. Problem is I get all the users who are single, plus all the users who are members of that particular group. However I want single users who are also member of Football club. I don't want the stylesheet to be hard-coded, because I also want to do filtering based on other elements. I can not figure out how can I save the filtered elements into something which could be used as an input for the next XPath expression. Or am I making some mistake while writing the constraints for filtering the document. Or could there be any other more appropriate way of writing a document for filtering? I will much appreciate your help. And I have one xml document "document" and two elements "filter" and "users".
  17. Xml code is something like this <kids> <dennis> <age> 6 </age> <weight> 10 </weight> </dennis> <john> <age> 8 </age> <weight> 20 </weight> </john></kids><adults> <tom> <age> 36 </age> <weight> 110 </weight> </tom> <kramer> <age> 80 </age> <weight> 67 </weight> </kramer></adults> now i know how to access all the ages in the document, suppose i need to access the ages of only children, or only adults how will i do it using javascript?
  18. I have some data in a flat file. These are the fields: nameaddressziplatlng A row of data might look something like: fishing hole #1, Catalina Island U.S., 90704, 33.3, 118.4 There are fifty rows of data. I am trying with PHP to encode this data into an XML file. The ultimate goal is that the data will be stored on the disk in XML format and when requested PHP will read the XML file and retrieve the data and put it into an array so I can encode the data in JSON and send it back off to JavaScript (AJAX). I'm very familiar with working with flat files and SQL however XML is a bit unfamiliar to me as of yet. How would this be accomplished? Good Evening W3Schools!
  19. The purpose of this assignment is for you to exercise your skills on: 1) server side processing ofXML technologies, 2) consuming web services and 3) making use of digital map services. Your taskin this exercise will be to develop and implement a web-based personalized location based newsservice that will visualize news content in the digital maps based on the location of the particularnews.The system you will develop should provide the following functionality to its users.1. Your system should allow the users to aggregate three different RSS feeds (they should bepure RSS and NOT GeoRSS feeds). Examples of such feeds can be found at:http://newsrss.bbc.c...n/world/rss.xmlhttp://www.nytimes.c...rvices/xml/rss/2. User should be able to filter the aggregated RSS feeds using a random keyword (you canchoose the keyword freely) and based on that to generate a new RSS feed containing onlythe filtered news items.3. The system should enable transformation of the filtered RSS feed into a GeoRSS.4. The system should visualize the generated GeoRSS feed using a digital map service (such asGoogle Maps, Yahoo Maps, Bing Maps, OpenStreetMaps etc.)Im kinda stuck in here , can please somebody help me with my project , cause my teacher is really bad in explaining ...So please somebody help me !
  20. Hi all,I have this XSLT: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/><xsl:template match="/"><xsl:apply-templates select="//prime"/></xsl:template> <xsl:template match="prime"> <xsl:apply-templates select="note[@style='tt']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <description> <xsl:value-of select="description"/> </description> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template><xsl:template match="prime"> <xsl:apply-templates select="note[@style='sms']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template></xsl:stylesheet> I want to show note type =tt and note type = sms in the same page because the content of each type is different, the problem with this xslt is that the note type sms is overwritting the note type = tt, in other words, it's only showing the note type= sms. How can I solve this... Thanks all
  21. sakat

    RSS and XML

    I wonder if anyone can help me? I am trying to connect to a RSS feed - which is in a xml file format - and display selected content from the feed in a web page; I am using a Wordpress site to display the output but I do not think that is really relevant. What I am stuck on is how exactly I import [connect to] the feed and then display selected content from the feed. I am used to dynamic content using PHP, MySQL, scripts, client and server side scripting etc so I feel that I should be able to work this out but am finding it very difficult to find reading material on the subject that I want. Can someone pls advise, detail:1. connect to a RSS feed2. display selected content from the feed using XML Thanks...
  22. Hi everyone, When creating a DTD, is there special syntax for when a child and grandchild element share the same name? i.e.: <!DOCTYPE Parent [<!ELEMENT name(#PCDATA)><!ELEMENT child(name,age)><!ELEMENT name(#PCDATA)><!ELEMENT age(#PCDATA>]> XMLuser
×
×
  • Create New...