xmljs-users Mailing List for xml for SCRIPT (Page 10)
Brought to you by:
djoham,
witchhunter
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(9) |
Mar
(20) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(14) |
Aug
(14) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(11) |
2005 |
Jan
(12) |
Feb
(4) |
Mar
(3) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2006 |
Jan
(2) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
(8) |
2007 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(8) |
Nov
|
Dec
(2) |
2008 |
Jan
(4) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2010 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(4) |
Jul
(5) |
Aug
(5) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(6) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
(5) |
Apr
(3) |
May
(5) |
Jun
(8) |
Jul
(3) |
Aug
(14) |
Sep
(22) |
Oct
(9) |
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: nurti <nu...@em...> - 2004-01-22 12:21:18
|
Thank's David, for your response. I have now another big problem! I = have to parse an xml stream with 7000 line and w3cdom parser get much tim= e for load this stream! Have yuo any suggest? You think that is better= an applet that xml for script for this large stream? Thank's -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Vieni a visitare il Garden Center Peraga. Seimila metri quadrati di espos= izione per servire una clientela competente ed esigente. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D1480&d=3D22-1 |
From: David J. <dj...@ya...> - 2004-01-20 17:15:26
|
Hi, I'm glad it worked for you. Can you send a quick code example of a situation where IE throws an error please? I have IE 5 and I don't get any error condition reported to me in my test cases. Thanks! David --- Chandan Kumar <cha...@bl...> wrote: > Thanks a lot. > The new file worked perfectly. > > The old file works if the namespaceaware property is set to false as shown > here: > ...................................................... > var parser = new DOMImplementation(); > //this property has to be set to false to enable the parser to read > tags closed in a single line > //for eg <A ........ /> > parser.namespaceAware = false; > ....................................................... > > There is another problem with the file in internet explorer. This problem > was present in the old file too. An "exception thrown but not caught" error > is thrown in IE. This problem vanished when line 428 in the new file was > commented: > ...................................................... > else if(iEvt == XMLP._ERROR) { > //throw(new DOMException(DOMException.SYNTAX_ERR)); > ......................................................... > > Thanks, > Chandan > > |-----Original Message----- > |From: David Joham [mailto:dj...@ya...] > |Sent: Tuesday, January 20, 2004 1:27 AM > |To: Chandan Kumar; xml...@li... > |Subject: Re: [xmljs-users] parsing problem > | > | > |--- Chandan Kumar <cha...@bl...> wrote: > |> Hi, > |> I started using xml for script just yesterday. > |> > |> I seem to be having a problem with parsing xml. If the xml > |contains a line > |> like this > |> > |> <A attribute1 ='value1' attribute2='value2' /> > |> > |> the parser does not read this in the domimplementation > |object. I am using > |> the w3cdom implementation. > |> > |> On the other hand, > |> xml like <A></A> works prefectly allright. > |> > |> Please let me know how to get over this problem. > |> > |> Thanks, > |> Chandan > |> > | > |I believe I have found the root problem for this. I have > |attached a new (gzipped) xmlw3cdom.js to > |this Email for your testing purposes. Please let me know if > |this fixes your problem. If it > |doesn't, can you please send a full XML code snippit to me? > |For reasons yet unexplained, the 3.0 > |parser seems to sometimes parse tags like this and sometimes > |not. I think what I'm sending you now > |will always parse them correctly. At least it has in all of my > |tests so far. > | > |Best regards, > | > |David > | > |__________________________________ > |Do you Yahoo!? > |Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > |http://hotjobs.sweepstakes.yahoo.com/signingbonus > | > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: David J. <dj...@ya...> - 2004-01-20 16:54:33
|
Do you mean something like this? <xml> <tag1 id="foo" /> <tag2 id="goo" /> <tag3 id="foo" /> </xml> and you want to do a query on all tags that have "foo" as the id? Is that what you're looking for? If so, there isn't any way by default with XML for <SCRIPT> but it shouldn't be too hard to build a recursive search that will go through all the tags and search for an id attribute that matches your query. If you really want to get into the code, you could also modify DOMDocument.prototype.getElementById in xmlw3cdom.js to return what you're looking for. Right now (by design) it returns the first node it finds with the correct id. It would be fairly simple to modify that to return an array (or better yet a DOMNodeList) of nodes that match your search query. Hope this helps! Best regards, David --- nurti <nu...@em...> wrote: > Hi, > Anyone know if is possible make a query on the xml that return a sublist of tag that match with > gived id? > If yes How? > > > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Scopri come investire i tuoi risparmi con Manuali.Net! > Tutti i trucchi ed i segreti in un comodo corso: > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1809&d=20-1 __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: nurti <nu...@em...> - 2004-01-20 10:47:22
|
Hi, Anyone know if is possible make a query on the xml that return a sub= list of tag that match with gived id? If yes How? -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Scopri come investire i tuoi risparmi con Manuali.Net! Tutti i trucchi ed i segreti in un comodo corso: Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D1809&d=3D20-1 |
From: Chandan K. <cha...@bl...> - 2004-01-20 06:54:50
|
Thanks a lot. The new file worked perfectly. The old file works if the namespaceaware property is set to false as shown here: ...................................................... var parser = new DOMImplementation(); //this property has to be set to false to enable the parser to read tags closed in a single line //for eg <A ........ /> parser.namespaceAware = false; ....................................................... There is another problem with the file in internet explorer. This problem was present in the old file too. An "exception thrown but not caught" error is thrown in IE. This problem vanished when line 428 in the new file was commented: ...................................................... else if(iEvt == XMLP._ERROR) { //throw(new DOMException(DOMException.SYNTAX_ERR)); ......................................................... Thanks, Chandan |-----Original Message----- |From: David Joham [mailto:dj...@ya...] |Sent: Tuesday, January 20, 2004 1:27 AM |To: Chandan Kumar; xml...@li... |Subject: Re: [xmljs-users] parsing problem | | |--- Chandan Kumar <cha...@bl...> wrote: |> Hi, |> I started using xml for script just yesterday. |> |> I seem to be having a problem with parsing xml. If the xml |contains a line |> like this |> |> <A attribute1 ='value1' attribute2='value2' /> |> |> the parser does not read this in the domimplementation |object. I am using |> the w3cdom implementation. |> |> On the other hand, |> xml like <A></A> works prefectly allright. |> |> Please let me know how to get over this problem. |> |> Thanks, |> Chandan |> | |I believe I have found the root problem for this. I have |attached a new (gzipped) xmlw3cdom.js to |this Email for your testing purposes. Please let me know if |this fixes your problem. If it |doesn't, can you please send a full XML code snippit to me? |For reasons yet unexplained, the 3.0 |parser seems to sometimes parse tags like this and sometimes |not. I think what I'm sending you now |will always parse them correctly. At least it has in all of my |tests so far. | |Best regards, | |David | |__________________________________ |Do you Yahoo!? |Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes |http://hotjobs.sweepstakes.yahoo.com/signingbonus | |
From: David J. <dj...@ya...> - 2004-01-19 19:56:53
|
--- Chandan Kumar <cha...@bl...> wrote: > Hi, > I started using xml for script just yesterday. > > I seem to be having a problem with parsing xml. If the xml contains a line > like this > > <A attribute1 ='value1' attribute2='value2' /> > > the parser does not read this in the domimplementation object. I am using > the w3cdom implementation. > > On the other hand, > xml like <A></A> works prefectly allright. > > Please let me know how to get over this problem. > > Thanks, > Chandan > I believe I have found the root problem for this. I have attached a new (gzipped) xmlw3cdom.js to this Email for your testing purposes. Please let me know if this fixes your problem. If it doesn't, can you please send a full XML code snippit to me? For reasons yet unexplained, the 3.0 parser seems to sometimes parse tags like this and sometimes not. I think what I'm sending you now will always parse them correctly. At least it has in all of my tests so far. Best regards, David __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: David J. <dj...@ya...> - 2004-01-19 17:06:25
|
Hmm, Well, isn't this embarrassing? Yes, I think I'm seeing your problem too. I don't have a root cause or a fix yet, but I'm looking at it. I'll be in touch. David --- Chandan Kumar <cha...@bl...> wrote: > Hi, > I started using xml for script just yesterday. > > I seem to be having a problem with parsing xml. If the xml contains a line > like this > > <A attribute1 ='value1' attribute2='value2' /> > > the parser does not read this in the domimplementation object. I am using > the w3cdom implementation. > > On the other hand, > xml like <A></A> works prefectly allright. > > Please let me know how to get over this problem. > > Thanks, > Chandan > __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: Chandan K. <cha...@bl...> - 2004-01-19 07:26:08
|
Hi, I started using xml for script just yesterday. I seem to be having a problem with parsing xml. If the xml contains a line like this <A attribute1 ='value1' attribute2='value2' /> the parser does not read this in the domimplementation object. I am using the w3cdom implementation. On the other hand, xml like <A></A> works prefectly allright. Please let me know how to get over this problem. Thanks, Chandan |
From: David J. <dj...@ya...> - 2004-01-09 11:25:45
|
Hi Dave, The contact manager app should just run with the local XML embedded inside the web page. You shouldn't need the perl proxy at all for that. The only time the proxies come into play is if you are needing to source your data from a domain outside of the one your web pages originate from. If that's the case, you might want to take a look at the proxy test suite. It gives a good example of how you use the proxies from javascript to get your XML. After that, everything is the same. If you do end up needing the perl proxy to source your data, the resource URLs are just an ordered list of the URLs that are the source for your data. For example $resourceURLs[0] = "http://other.domain.xml/getxml.pl" or something like that. In your javascript, you would reference this URL by it's position in the array (in this case 0). All that being said however, most people don't need to use the proxies. In the vast majority of cases, the XML they need can be embedded in the page in something like an embedded text area. This technique is described in http://xmljs.sourceforge.net/website/documentation-faq.html#faqhowdoigetxmltobrowser Hopefully, that will get you going. If not, please post again and I'll try to help. I'm actually going to be only sporatically available during the next week or so (I'm in Brazil on business) but I'll do the best I can to help out. Best regards, David --- Dave Cook <smo...@ro...> wrote: > Hi: > > Newbie question. How do I set up my Perl Proxy? I read the docs, but still a little confused > about the list of Resource URL's. I've installed all the software and I'm just trying to run > the contact manager app locally on my server. I need a bit more detail on how the app interacts > with the proxy. Where should the perlproxy program reside? How is it called from the contact > manager program? Are there any Apache settings I need to setup? Things like that. BTW: this > is an awesome app. It's just what I was looking for. > > regards, > Dave F. Cook > CTO > Planitech Systems Inc. __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus |
From: Dave C. <smo...@ro...> - 2004-01-09 05:04:52
|
Hi: Newbie question. How do I set up my Perl Proxy? I read the docs, but = still a little confused about the list of Resource URL's. I've = installed all the software and I'm just trying to run the contact = manager app locally on my server. I need a bit more detail on how the = app interacts with the proxy. Where should the perlproxy program = reside? How is it called from the contact manager program? Are there = any Apache settings I need to setup? Things like that. BTW: this is an = awesome app. It's just what I was looking for. regards, Dave F. Cook CTO Planitech Systems Inc. |
From: David J. <dj...@ya...> - 2003-11-22 20:43:58
|
I think you mean... > var currentCoverArtPath = > "/player_status/current_song/song/coverart"; > var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > > if (xmlFetchedCoverArt != null) { // <-- changed the check to xmlFetched.... > var fetchedCoverArt = xmlFetchedCoverArt.getText(); > do what I need to do to get the Cover Art } > > else { display a blank image } right? :) >that's what I get for trying to > learn XML for SCRIPT and CURL in a week. :) Good luck on the rest of your project! David __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |
From: David J. <dj...@ya...> - 2003-11-22 03:13:29
|
Hi! If I'm reading your question right, I would just do the selectNode as you normally do. Once you get the result, check for null. If it is null, you know that the node wasn't there. Otherwise, you know it was and can continue as normal. Does that work? David --- Info <in...@be...> wrote: > Hey David, > I found that I had to "double escape" the apostrophes while calling the > CURL function from within my XML for SCRIPT JavaScript, like so: > > var escapedCamImage = unescapedCamImage.replace(/'/g, "\\'"); > > > And then it went through and saved my images! Building on the below, I > do have a question that you may be able to help me with. The way the > XML page I'm reading from is set up, is that if there is no Cover Art, > the XML tag isn't even written. Here's what it looks like if there is > Cover Art: > > >>> <coverart><![CDATA[/music/ > >>> %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams > >>> ,%2 > >>> 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > >>> coverart> > > > And I can pull that path just fine, but if there is no Cover Art, the > XML output doesn't write an empty tag, like this: > > <coverart></coverart> > > > It simply doesn't write anything at all! So, when I run my XML for > SCRIPT, it complains that it can't find that tag (for all the right > reasons). How can I say: > > - Look for <coverart>xxxxx</coverart>, and if it's there, use XML for > SCRIPT to get it. And if it's not, don't bother looking (so I don't get > an error) > > > Any help would be great... I'm having trouble doing the if/else because > I don't know how to tell XML for SCRIPT to look for something that may > not be there at all. > > Thank you again, > Art > > > > > > > Begin forwarded message: > > > From: (Berklie) Info <in...@be...> > > Date: Thu Nov 20, 2003 6:09:49 PM America/Chicago > > To: David Joham <dj...@ya...> > > Subject: Re: [xmljs-users] Escaping " ' " in .getText(); > > > > Hi David, > > I really, really, really want to thank you for getting back to me, but > > I have no idea how to help you help me (and don't have a clue of what > > to do with the file you sent). All I know is that I'm using > > "xmldom.js" to parse XML data in order to get artwork displayed into > > one of my Konfabulator (www.konfabulator.com) widgets. With this code: > > > > var currentCoverArtPath = "/player_status/current_song/song/coverart"; > > var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > > var fetchedCoverArt = xmlFetchedCoverArt.getText(); > > > > theCoverArt.src = "http://192.168.1.100:9000" + fetchedCoverArt; > > > > > > I can get an image to show up if the CDATA does not contain an > > apostrophe ('). For example: > > > > <coverart><![CDATA[/music/ > > %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams,% > > 20Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > > coverart> > > > > > > But if the CDATA does contain an apostrophe, the program tells me: > > > > Failed to load image: Resources/Cache/cache.jpg (invalid image file) > > > > > > Looking more closely though, it appears that it may be something else > > (which I still wouldn't know how to fix). With the above data, a local > > file is created using: > > > > coverArtInfo[0] = theCoverArt.src; > > cacheFile = "Resources/Cache/cache.jpg"; > > > > var getImage = "curl --silent " + coverArtInfo[0] + " --max-time 300 > > -w \"%{http_code}\\n\" --output " + cacheFile; > > > > > > The cache file which is created ("Resources/Cache/cache.jpg") cannot > > be opened by either Photoshop or anything else when there is an > > apostrophe in the CDATA. So, apparently it isn't XML for SCRIPT... > > it's CURL creating a bad file if there's an apostrophe in the CDATA. I > > suppose I'll have to find some sort of CURL forum to ask about it, > > since I just copied and pasted code and have no idea what those CURL > > commands above do. > > > > Any ideas as to why CURL would mess up saving an image if it's web > > address has an apostrophe? It's okay if you don't have time... you > > only signed up for XML for SCRIPT help ;-). > > > > Thanks again, > > Art > > > > > > > > > > > > > > On Thursday, November 20, 2003, at 04:32 PM, David Joham wrote: > > > >> Hi! > >> > >> I'm not sure I'm seeing what you are describing. I just tried a quick > >> derivation of the tagpath > >> example application with some CDATA and an apostrophy and it seemed > >> to work. Please see the > >> attached gzipped example. You can load it by replacing > >> domTagPathExample.html in: > >> > >> xml_for_script-3.0/sampleApplications/classicDom/ > >> domSampleApplicationTagPath > >> > >> with the domTagPathExample.html I'm including with this message. > >> > >> When I load that example and hit the button, it comes back with what > >> I would expect, which is the > >> full string. Do you see something different? > >> > >> When you say it doesn't work, what exactly do you mean? Does the > >> string get cut off or truncated > >> at the position of the apostrophy when you call getText()? Or does > >> the tagpath not work at all? > >> > >> Would it be possible to put together a quick recreation and send that > >> to me. If you can, I can > >> probably figure out what's going on pretty quick and get you going... > >> > >> Thanks > >> > >> David > >> > >> > >> --- Info <in...@be...> wrote: > >>> Hi there, > >>> I'm using XML for SCRIPT in the following manner: > >>> > >>> var currentCoverArtPath = > >>> "/player_status/current_song/song/coverart"; > >>> var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > >>> var fetchedCoverArt = xmlFetchedCoverArt.getText(); > >>> > >>> if (fetchedCoverArt == "") { fetchedCoverArt = > >>> "Resources/background.png"; } > >>> else { theCoverArt.src = "http://192.168.1.100:9000" + > >>> fetchedCoverArt; } > >>> > >>> > >>> This works great to display album Cover Art when the string is > >>> something like this: > >>> > >>> <coverart><![CDATA[/music/ > >>> %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams > >>> ,%2 > >>> 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > >>> coverart> > >>> > >>> > >>> But if the string has a " ' " in it, like this (with the > >>> "B-52's,%20The" or "1979%20The%20B-52's"): > >>> > >>> <coverart><![CDATA[/music/ > >>> %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fB- > >>> 52's,%20The%2f1979%20The%20B-52's%2f01-Planet%20Claire.mp3/ > >>> cover.jpg]]></coverart> > >>> > >>> > >>> It doesn't work. Obviously (well I think anyway), it's because the " > >>> ' > >>> " is causing the script to think the statement is over. How can I get > >>> it to know that the " ' " is okay to have? I guess I'm trying to > >>> figure > >>> out how to "escape" it? > >>> > >>> Thanks, > >>> BD > >>> > >>> > >>> > >>> ------------------------------------------------------- > >>> This SF.net email is sponsored by: SF.net Giveback Program. > >>> Does SourceForge.net help you be more productive? Does it > >>> help you create better code? SHARE THE LOVE, and help us help > >>> YOU! Click Here: http://sourceforge.net/donate/ > >>> _______________________________________________ > >>> xmljs-users mailing list > >>> xml...@li... > === message truncated === __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |
From: David J. <dj...@ya...> - 2003-11-21 02:24:57
|
Sorry, I'm not going to be able to be much help on the Curl side :) The only thing I can think of is to do a regular expression search and replace for an apostropy and escape it with the "\" escape character in your file names and paths. The regular expression you would normally use to do something like this is: s/'/\/'/g which would turn all of the "'" characters into "\'". JavaScript does things a little differently. You will probably want to have code that looks similar to the following: var myAposString = "x'x'x"; var regEx = /\'/g; var myEscapedString = myAposString.replace(regEx, "\\'"); alert(myEscapedString); In this case, myEscapedString will be x\'x\'x From looking at your code below, I'm guessing that you would apply this regular expression to your coverArtInfo[0] variable. Doing so might make Curl happy - but that's just a guess... If you're still curious about what to do with the file I sent to you, here are all the steps you would need to see my example. 1) gunzip the file (If you're not a UNIX user, winzip will do this for you) 2) overwrite the existing domTagPathExample.html in xml_for_script-3.0/sampleApplications/classicDom/domSampleApplicationTagPath with the new file 3) load that file and hit the button. It performs a tagPath query and getText() on a node with a CDATA child that contains an apostropy. I hope this helps! Best regards, David --- Info <in...@be...> wrote: > Hi David, > I really, really, really want to thank you for getting back to me, but > I have no idea how to help you help me (and don't have a clue of what > to do with the file you sent). All I know is that I'm using "xmldom.js" > to parse XML data in order to get artwork displayed into one of my > Konfabulator (www.konfabulator.com) widgets. With this code: > > var currentCoverArtPath = "/player_status/current_song/song/coverart"; > var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > var fetchedCoverArt = xmlFetchedCoverArt.getText(); > > theCoverArt.src = "http://192.168.1.100:9000" + fetchedCoverArt; > > > I can get an image to show up if the CDATA does not contain an > apostrophe ('). For example: > > <coverart><![CDATA[/music/ > %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams,%2 > 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > coverart> > > > But if the CDATA does contain an apostrophe, the program tells me: > > Failed to load image: Resources/Cache/cache.jpg (invalid image file) > > > Looking more closely though, it appears that it may be something else > (which I still wouldn't know how to fix). With the above data, a local > file is created using: > > coverArtInfo[0] = theCoverArt.src; > cacheFile = "Resources/Cache/cache.jpg"; > > var getImage = "curl --silent " + coverArtInfo[0] + " --max-time 300 -w > \"%{http_code}\\n\" --output " + cacheFile; > > > The cache file which is created ("Resources/Cache/cache.jpg") cannot be > opened by either Photoshop or anything else when there is an apostrophe > in the CDATA. So, apparently it isn't XML for SCRIPT... it's CURL > creating a bad file if there's an apostrophe in the CDATA. I suppose > I'll have to find some sort of CURL forum to ask about it, since I just > copied and pasted code and have no idea what those CURL commands above > do. > > Any ideas as to why CURL would mess up saving an image if it's web > address has an apostrophe? It's okay if you don't have time... you only > signed up for XML for SCRIPT help ;-). > > Thanks again, > Art > > > > > > > On Thursday, November 20, 2003, at 04:32 PM, David Joham wrote: > > > Hi! > > > > I'm not sure I'm seeing what you are describing. I just tried a quick > > derivation of the tagpath > > example application with some CDATA and an apostrophy and it seemed to > > work. Please see the > > attached gzipped example. You can load it by replacing > > domTagPathExample.html in: > > > > xml_for_script-3.0/sampleApplications/classicDom/ > > domSampleApplicationTagPath > > > > with the domTagPathExample.html I'm including with this message. > > > > When I load that example and hit the button, it comes back with what I > > would expect, which is the > > full string. Do you see something different? > > > > When you say it doesn't work, what exactly do you mean? Does the > > string get cut off or truncated > > at the position of the apostrophy when you call getText()? Or does the > > tagpath not work at all? > > > > Would it be possible to put together a quick recreation and send that > > to me. If you can, I can > > probably figure out what's going on pretty quick and get you going... > > > > Thanks > > > > David > > > > > > --- Info <in...@be...> wrote: > >> Hi there, > >> I'm using XML for SCRIPT in the following manner: > >> > >> var currentCoverArtPath = "/player_status/current_song/song/coverart"; > >> var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > >> var fetchedCoverArt = xmlFetchedCoverArt.getText(); > >> > >> if (fetchedCoverArt == "") { fetchedCoverArt = > >> "Resources/background.png"; } > >> else { theCoverArt.src = "http://192.168.1.100:9000" + > >> fetchedCoverArt; } > >> > >> > >> This works great to display album Cover Art when the string is > >> something like this: > >> > >> <coverart><![CDATA[/music/ > >> %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams, > >> %2 > >> 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > >> coverart> > >> > >> > >> But if the string has a " ' " in it, like this (with the > >> "B-52's,%20The" or "1979%20The%20B-52's"): > >> > >> <coverart><![CDATA[/music/ > >> %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fB- > >> 52's,%20The%2f1979%20The%20B-52's%2f01-Planet%20Claire.mp3/ > >> cover.jpg]]></coverart> > >> > >> > >> It doesn't work. Obviously (well I think anyway), it's because the " ' > >> " is causing the script to think the statement is over. How can I get > >> it to know that the " ' " is okay to have? I guess I'm trying to > >> figure > >> out how to "escape" it? > >> > >> Thanks, > >> BD > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.net email is sponsored by: SF.net Giveback Program. > >> Does SourceForge.net help you be more productive? Does it > >> help you create better code? SHARE THE LOVE, and help us help > >> YOU! Click Here: http://sourceforge.net/donate/ > >> _______________________________________________ > >> xmljs-users mailing list > >> xml...@li... > >> https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > __________________________________ > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > http://companion.yahoo.com/<domTagPathExample.html.gz> > __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |
From: David J. <dj...@ya...> - 2003-11-20 22:32:29
|
Hi! I'm not sure I'm seeing what you are describing. I just tried a quick derivation of the tagpath example application with some CDATA and an apostrophy and it seemed to work. Please see the attached gzipped example. You can load it by replacing domTagPathExample.html in: xml_for_script-3.0/sampleApplications/classicDom/domSampleApplicationTagPath with the domTagPathExample.html I'm including with this message. When I load that example and hit the button, it comes back with what I would expect, which is the full string. Do you see something different? When you say it doesn't work, what exactly do you mean? Does the string get cut off or truncated at the position of the apostrophy when you call getText()? Or does the tagpath not work at all? Would it be possible to put together a quick recreation and send that to me. If you can, I can probably figure out what's going on pretty quick and get you going... Thanks David --- Info <in...@be...> wrote: > Hi there, > I'm using XML for SCRIPT in the following manner: > > var currentCoverArtPath = "/player_status/current_song/song/coverart"; > var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); > var fetchedCoverArt = xmlFetchedCoverArt.getText(); > > if (fetchedCoverArt == "") { fetchedCoverArt = > "Resources/background.png"; } > else { theCoverArt.src = "http://192.168.1.100:9000" + > fetchedCoverArt; } > > > This works great to display album Cover Art when the string is > something like this: > > <coverart><![CDATA[/music/ > %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams,%2 > 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ > coverart> > > > But if the string has a " ' " in it, like this (with the > "B-52's,%20The" or "1979%20The%20B-52's"): > > <coverart><![CDATA[/music/ > %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fB- > 52's,%20The%2f1979%20The%20B-52's%2f01-Planet%20Claire.mp3/ > cover.jpg]]></coverart> > > > It doesn't work. Obviously (well I think anyway), it's because the " ' > " is causing the script to think the statement is over. How can I get > it to know that the " ' " is okay to have? I guess I'm trying to figure > out how to "escape" it? > > Thanks, > BD > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |
From: (Berklie) I. <in...@be...> - 2003-11-20 21:44:32
|
Hi there, I'm using XML for SCRIPT in the following manner: var currentCoverArtPath = "/player_status/current_song/song/coverart"; var xmlFetchedCoverArt = xml.selectNode(currentCoverArtPath); var fetchedCoverArt = xmlFetchedCoverArt.getText(); if (fetchedCoverArt == "") { fetchedCoverArt = "Resources/background.png"; } else { theCoverArt.src = "http://192.168.1.100:9000" + fetchedCoverArt; } This works great to display album Cover Art when the string is something like this: <coverart><![CDATA[/music/ %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fAdams,%2 0Ryan%2f2001%20Gold%2f01-New%20York,%20New%20York.mp3/cover.jpg]]></ coverart> But if the string has a " ' " in it, like this (with the "B-52's,%20The" or "1979%20The%20B-52's"): <coverart><![CDATA[/music/ %2fVolumes%2fAlexandria%20Project%2fMusic%20Library%2fArtists%2fB- 52's,%20The%2f1979%20The%20B-52's%2f01-Planet%20Claire.mp3/ cover.jpg]]></coverart> It doesn't work. Obviously (well I think anyway), it's because the " ' " is causing the script to think the statement is over. How can I get it to know that the " ' " is okay to have? I guess I'm trying to figure out how to "escape" it? Thanks, BD |
From: David J. <dj...@ya...> - 2003-11-18 17:19:01
|
You're welcome Eric, What kind of servers do they use? Most non-MS solutions already have an XML parser built into them so you may be able to use something after all. Please let me know if I can be any more help! Best regards, David --- Eric Hobart <eh...@du...> wrote: > Thanks David, > > This gives me a starting point ... I have to learn more about xml before I > try to incorporate any features on the alumni magazine site. > > The pages will be standard xhtml ... the University doesn't use Microsoft > servers (no ASP), and the IT folks are reluctant to let us deploy Cold > Fusion on their production server. They also don't allow Server Side > Includes, although if we can put the parser on our departmental server and > point to it from within the pages hosted on the University's server, that > might be an option. > > I'll keep in touch as I learn more. I'm having to approach this project in > phases, but I don't want to create any obstacles along the way that would > necessitate a lot of recoding to reach the final goal of complete (or as > close as possible) xml automation. > > Thanks again ... I still have a lot to learn. > > Eric > > -----Original Message----- > From: David Joham [mailto:dj...@ya...] > Sent: Tuesday, November 18, 2003 9:57 AM > To: Eric Hobart > Subject: Re: [xmljs-users] converting Word docs to xml and dynamically > filling a site in xhtml > > > > Hi Eric, > > I'm not sure the normal usage of XML for <SCRIPT> is going to be a whole lot > of help for you since > it's primarily a client-side solution. However, you might be able to get > around the "no XML parser > on the server" problem by using server-side Javascript in your (what I > presume) ASP pages. > > There shouldn't be any reason why XML for <SCRIPT> wouldn't work as a > server-side parser. I assume > the JavaScript engine is the same between IE and IIS. > > If the idea of using XML for <SCRIPT> on the server-side works for you, then > you have a lot of > different options - the best (IMHO) is to use the XML parser to grab > whatever XML you need and > then dynamically build the xhtml+css to send to the browsers. Since your > work is primarily > content-oriented, that will probably get you where you need to go without > having to use anything > truly fancy on the client's side. > > Does this help you out? I'd be happy to answer any more specific questions > if you still need some > assistance... > > > Best regards, > > David > > --- Eric Hobart <eh...@du...> wrote: > > Hello, > > > > I'm an xml rookie and am looking for some general guidelines on deploying > an > > xml parser and using it to pull content from a well-styled Word document > > (eventually Quark documents). My overall goal is to create a mechanism > that > > uses xml to dynamically create and fill pages on a site with xhtml pages. > > > > I post our University's alumni magazine online and am in the process of > > converting all pages to xhtml strict. I'm educating myself on schemas, > xslt, > > etc., to figure out how to automate page creation and introduction of > > content to those pages. I'm well versed in CSS and plan to keep > presentation > > there. > > > > Our University IT group will not install an xml parser on the University's > > production server, so I'll have to perform all transformation on our > > department's server and manually load the complete online magazine site to > > the University server. I also need to maintain an archive of all previous > > issues online. > > > > Optimally, I'd like to automate creation of each issues navigation as > well. > > > > Any help would be greatly appreciated ... I'd like to avoid using > > proprietary solutions (Dreamweaver templates, Cold Fusion) if it's > possible > > to do the same work with xml. > > > > Thanks ahead of time. > > > > > > Eric Hobart > > Web Developer > > University of Denver > > Communications & Marketing > > 303.871.3590 > > eh...@du... > > www.du.edu > > www.du.edu/news > > www.du.edu/ocm/newsletter > > > > > > > > > > ------------------------------------------------------- > > This SF. Net email is sponsored by: GoToMyPC > > GoToMyPC is the fast, easy and secure way to access your computer from > > any Web browser or wireless device. Click here to Try it Free! > > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > __________________________________ > Do you Yahoo!? > Protect your identity with Yahoo! Mail AddressGuard > http://antispam.yahoo.com/whatsnewfree > __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
From: David J. <dj...@ya...> - 2003-11-18 17:00:15
|
Hi Eric, I'm not sure the normal usage of XML for <SCRIPT> is going to be a whole lot of help for you since it's primarily a client-side solution. However, you might be able to get around the "no XML parser on the server" problem by using server-side Javascript in your (what I presume) ASP pages. There shouldn't be any reason why XML for <SCRIPT> wouldn't work as a server-side parser. I assume the JavaScript engine is the same between IE and IIS. If the idea of using XML for <SCRIPT> on the server-side works for you, then you have a lot of different options - the best (IMHO) is to use the XML parser to grab whatever XML you need and then dynamically build the xhtml+css to send to the browsers. Since your work is primarily content-oriented, that will probably get you where you need to go without having to use anything truly fancy on the client's side. Does this help you out? I'd be happy to answer any more specific questions if you still need some assistance... Best regards, David --- Eric Hobart <eh...@du...> wrote: > Hello, > > I'm an xml rookie and am looking for some general guidelines on deploying an > xml parser and using it to pull content from a well-styled Word document > (eventually Quark documents). My overall goal is to create a mechanism that > uses xml to dynamically create and fill pages on a site with xhtml pages. > > I post our University's alumni magazine online and am in the process of > converting all pages to xhtml strict. I'm educating myself on schemas, xslt, > etc., to figure out how to automate page creation and introduction of > content to those pages. I'm well versed in CSS and plan to keep presentation > there. > > Our University IT group will not install an xml parser on the University's > production server, so I'll have to perform all transformation on our > department's server and manually load the complete online magazine site to > the University server. I also need to maintain an archive of all previous > issues online. > > Optimally, I'd like to automate creation of each issues navigation as well. > > Any help would be greatly appreciated ... I'd like to avoid using > proprietary solutions (Dreamweaver templates, Cold Fusion) if it's possible > to do the same work with xml. > > Thanks ahead of time. > > > Eric Hobart > Web Developer > University of Denver > Communications & Marketing > 303.871.3590 > eh...@du... > www.du.edu > www.du.edu/news > www.du.edu/ocm/newsletter > > > > > ------------------------------------------------------- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
From: Eric H. <eh...@du...> - 2003-11-18 16:41:41
|
Hello, I'm an xml rookie and am looking for some general guidelines on deploying an xml parser and using it to pull content from a well-styled Word document (eventually Quark documents). My overall goal is to create a mechanism that uses xml to dynamically create and fill pages on a site with xhtml pages. I post our University's alumni magazine online and am in the process of converting all pages to xhtml strict. I'm educating myself on schemas, xslt, etc., to figure out how to automate page creation and introduction of content to those pages. I'm well versed in CSS and plan to keep presentation there. Our University IT group will not install an xml parser on the University's production server, so I'll have to perform all transformation on our department's server and manually load the complete online magazine site to the University server. I also need to maintain an archive of all previous issues online. Optimally, I'd like to automate creation of each issues navigation as well. Any help would be greatly appreciated ... I'd like to avoid using proprietary solutions (Dreamweaver templates, Cold Fusion) if it's possible to do the same work with xml. Thanks ahead of time. Eric Hobart Web Developer University of Denver Communications & Marketing 303.871.3590 eh...@du... www.du.edu www.du.edu/news www.du.edu/ocm/newsletter |
From: David J. <dj...@ya...> - 2003-10-08 02:30:14
|
Hello all! XML for <SCRIPT> 3.0 has officially been released. For the curious, here are the release notes: A standards-compliant W3C DOM Parser is added to the distribution. This DOM Parser complies with the W3C Level 1 and Level 2 standards. XML for SCRIPT 3.0's new DOM Parser comes complete with a new sample application as well as three new test suites and extensive documentation. XML for SCRIPT now has over a MegaByte of documentation! A .NET Server-Side proxy has been added An ASP Server-Side proxy has been added The xmlIO functions have been extended to allow for XML loading from the current domain without the need of a Server-Side proxy. A sample application demonstrating this feature has been added to the distribution and full documentation is available. This feature can also be used to load XML off of the local file system for developers creating applications that run from the client's computer and do not use a web server. A new site layout (still based off of Jennifer Sims' concept) has been introduced. This layout adds space for all of the documentation required for XML for SCRIPT 3.0's feature set and allows for further expansion in the future. It also allows for direct links to all pages. A mailing list has been made available for users, developers and anyone else interested in XML for SCRIPT to exchange ideas, questions and/or code. A new Contributed Add-on has been created. The new "LinkChecker" Add-on allows developers to check their sites for broken links simply by providing the address of the home page of the web site. This Contributed Add-on is also fully documented. More information can be found by visiting http://xmljs.sourceforge.net Best regards, David __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: David J. <dj...@ca...> - 2003-09-21 16:13:29
|
Hello, This is a test of the mailing list system. Welcome to anyone subscribing! This message will serve as a stealth pre-announcement of XML for <SCRIPT> 3.0 which will ship sometime in October 2003 with a W3C DOM Level 2 implementation! Best regards, David |