XML/RSS feeds

so im loading an xml file from an rss feed into a datagrid, i
then want to do a search on the column to see if a specific word
comes before the next.
example: loads several items(strings of text) from the xml
file into the datagrid,
i need to select which item to search
and then have it tell me which word came first in that
string/item(eg. red, or blue)
i have it successfully loading the xml file and putting it in
the datagrid, i just cant figure out how to search specific items
and how to see which of those 2 words comes first in any given
item/string

Can you use indexOf() and then compare the indicies to see
which one is less.
if (string.indexOf("red") < string.indexOf("blue")) {
// red came first
} else {
// blue came first
Not sure if I understood your question completely, but
thought I would give it a shot.
Tim

Similar Messages

  • How to create an XML/RSS feed from a SQL recordset?

    I've been trying to find either a tutorial or extension that will allow me to take a SQL recordset, and create my RSS feed on the fly.  Not having much luck... anyone out there have a suggestion??

    Thanks PC!
    I made it work using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
    InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
    // Parse the InputStream and build the document
    Document document = parser.parse(in);
    But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code?

  • Using xml rss feeds in dreamweaver

    I used dreamweaver to configure a rss feed in my webpage.
    One thing led to another and I was forced to reinstall my php
    server via
    xampp
    Now when I load the page on my computer I have this error:
    Fatal error: Call to undefined method domdocument::loadXML()
    in
    N:\INETPUB\xampp\htdocs\1purpose_bethel\includes\MM_XSLTransform\MM_XSLTransform.class.ph p
    on line 303
    I checked the includes folder and I do have the class file
    MM_XSLTransform.class.php
    but what I am wondering is if there is a place in my php.ini
    file that needs
    to modified to allow for the RSS feed? Or is there something
    else that I am
    over looking?
    any insight would be greatly appreciated
    thank you
    Kevin

    Hi, I'm also having the same error. I found in some other
    forums that I should do the following (I think its you David who
    suggested it):
    comment the line --> $xml =
    DOMDocument::loadXML($content);
    then add these two lines
    $doc = new DOMDocument();
    $err = $doc->loadXML($content);
    Well, actually when MM_XSLTransform.class.php was created it
    was already updated. But I'm still getting the error.
    I'm still a baby in PHP and I've been trying to figure it out
    for 2 days and nothing is happening.
    Please, please...your response will be highly appreciated.
    Kind regards,
    Jeng

  • I figured out the XML RSS feed to webpage but..

    Hello All
    I finally figured out how to get and rss feed xml to my
    webpage(s) via the Spry xml data set etc.. when I previewed in IE
    it was fine but I uploaded it and I get an error
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct
    the error and then click the Refresh button, or try again later.
    Only one top level element is allowed in an XML document.
    Error processing resource '
    http://www.michaelsondesign.com/Spry/r...
    I just want to show my boss that I have been working on this
    and would love to show him an example of this awesome technology is
    there something Im not uploading? What does this error mean?
    Thank you
    Rob

    Hi,
    I am trying to display an RSS feed on my website as well. I
    haven't figured it out.
    Can you help?
    Thanks,
    H.J.D.
    [email protected]

  • Editing XML/RSS feed in iWeb to input all neccessary information for iTunes

    I have been trawling through a lot of the other posts but don't seem to be able to find an answer.
    Basically, i have successfully created my own page to host my podcasts and i have had my RSS feed accepted by iTunes. I can now view my podcast from the link the iTunes staff sent to me, however i am unable to find it by typing the name into the search bar. I have read in the podcast help on this forum that it may be because i have to add 'key words' to the XML as this is what the search tool uses to find the podcasts but i am unable to work out exactly how to do this. I have found my XML page and attempted to insert some lines using TextEdit but this just appears to corrupt my feed.
    If anyone has had a similar problem and knows of a solution, it would be greatly appreciated by myself.
    Thanks for reading :o)

    Alancito wrote:
    funky_ben wrote:
    I have found my XML page and attempted to insert some lines using TextEdit but this just appears to corrupt my feed.
    If the file you're editing has an ".html" extension, then this from TextEdit's +Help viewer+ may be relevant:
    If you want to work with an existing HTML file, choose File > Open and select the file you want. Be sure to select “Ignore rich text commands.” When you save the file, it remains a “.html” file.
    ...And there are other places where important selections are made for HTML files:
    In TextEdit's Save dialogue, select "HTML" from the +File Format+ menu.
    In TextEdit's +Preferences > New Document+ tab, select +"Plain text"+.
    In TextEdit's +Preferences > Open and Save+ tab, select +"Ignore rich text commands in HTML files"+.
    XML is not HTML your last post is irrelevant you should know what you're talking about before providing recommendations.
    Is this a late April Fools joke?
    funky_ben,
    You do not add XML data into an html file it should be inserted into an XML file look over the iTunes tech spec page provided unfortunately reading comprehension is required.

  • Editing xml rss feed

    Hi, is there any tweaking that I should do to my xml files after the page is published to give it identity and perhaps a tune up for better search results? Any help would help.

    Alancito wrote:
    funky_ben wrote:
    I have found my XML page and attempted to insert some lines using TextEdit but this just appears to corrupt my feed.
    If the file you're editing has an ".html" extension, then this from TextEdit's +Help viewer+ may be relevant:
    If you want to work with an existing HTML file, choose File > Open and select the file you want. Be sure to select “Ignore rich text commands.” When you save the file, it remains a “.html” file.
    ...And there are other places where important selections are made for HTML files:
    In TextEdit's Save dialogue, select "HTML" from the +File Format+ menu.
    In TextEdit's +Preferences > New Document+ tab, select +"Plain text"+.
    In TextEdit's +Preferences > Open and Save+ tab, select +"Ignore rich text commands in HTML files"+.
    XML is not HTML your last post is irrelevant you should know what you're talking about before providing recommendations.
    Is this a late April Fools joke?
    funky_ben,
    You do not add XML data into an html file it should be inserted into an XML file look over the iTunes tech spec page provided unfortunately reading comprehension is required.

  • View and Edit the XML rss feed code?

    Hey? I'm trying to change the image graphic on my iTunes STORE podcast. ITS says I need to add a tag to the xml in the feed. Using iWeb, I can't see how to get 'under the hood' to see the code;
    any ideas to help?

    Thanks, Tom.....
    So,what do you mean exactly; use Safari's 'view source'; paste to BBEdit or something like that?
    Okay, but then how to get the changes back up to the iweb site?

  • AS3 RSS FEED XML Namespace

    AS3 - FLASH 10
    Hello,
    I'm having some trouble understanding how can I access a tag in a xml RSS Feed 2 format. Some tags have, what I think to be, namespaces that just ignore my request when accessing such tag. Here is an example:
    // XML LOADED
    <rss>
    <channel>
    <item>
        <title>POST TITLE</title>
        <link>http://domain.org/blog/2009/08/post-name/</link>
        <comments>http://domain.org/blog/2009/08/post-name/#comments</comments>
        <pubDate>Mon, 31 Aug 2009 21:39:40 +0000</pubDate>
        <dc:creator>admin</dc:creator>
        <category><![CDATA[CATEGORY]]></category>
        <category><![CDATA[CATEGORY]]></category>
        <guid isPermaLink="false">http://domain.org/blog/?p=3</guid>
        <description><![CDATA[DATA[...]]]></description>
        <content:encoded><![CDATA[DATA]]></content:encoded>
        <wfw:commentRss>http://domain.org/blog/2009/08/post-name/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>
    </item>
    </channel>
    </rss>
    // FLASH CODE
    trace ( xml.channel.item.title ) // Output POST TITLE
    trace ( xml.channel.item.content ) // Output undefined or “”
    … same for wfw and slash tags.
    Any help?
    Regards

    One of the ways is to use regular expressions and replace all the unwanted namespaces with pure tags:
    1. Get the xml data as string:
    var xmlString:String = [write the data here]
    2. Pattern for the tags with namespaces is something like this:
    var exp:RegExp = /<\\|(\w+):(\w+)>/gi;
    3. This is just to demostrate what it outputs: - is not needed in the final code
    var tagsArray:Array = xmlString.match(exp);
    var currentOccurance:Array;
    for (var i:int = 0; i < tagsArray.length; i++) {
         currentOccurance = tagsArray[i].split(":");
         trace("left = " + currentOccurance[0] + "; right = " + currentOccurance[1]);
    It outputs something like this:
    left = content; right = encoded>
    left = content; right = encoded>
    left = wfw; right = commentRss>
    left = wfw; right = commentRss>
    left = slash; right = comments>
    left = slash; right = comments>
    4. Depending on what side you want to use in the final tag:
    a. If left:
    xmlString = xmlString.replace(exp, "$1");
    It will make the following changes:
    From:
    <content:encoded>....</content:encoded>
    <wfw:commentRss>...</wfw:commentRss>
    To:
    <content>....</content>
    <wfw>...</wfw>
    b. if right:
    xmlString = xmlString.replace(exp, "$2>");
    It will make the following changes:
    To
    <encoded>....</encoded>
    <commentRss>...</commentRss>
    The final code is actually 4 lines only (assuming you use complete event):
    var xmlString:String = e.target.data;
    var exp:RegExp = /<\\|(\w+):(\w+)>/gi;
    xmlString = xmlString.replace(exp, "$1");
    var myXML:XML = new XML(xmlString);
    Viola! You can parse xml regular way.

  • RSS Feed Reader in Catalyst?

    Hi everyone,
    Is there a way for a Flash Widget created in Catalyst to read an RSS feed? If so, how do I go about doing that?
    Thanks a bunch!
    Rob

    Sorry.  That needs to be fixed.
    Here is an article from the Flex Developers Center:
    http://www.adobesystems.ca/devnet/flex/articles/flashbuilder4_http_connection_02.html
    And a resource for learning Flex in general (Flash Builder is the development environment).
    http://www.adobe.com/devnet/flex/videotraining/
    The particular area you want to look at is Requesting and retrieving XML data from the server.
    http://www.adobe.com/devnet/flex/articles/flashbuilder4_http_connection_03.html
    Rss feeds have a common XML structure.  Here's a reference on the rss xml structure. 
    http://www.webreference.com/authoring/languages/xml/rss/feeds/
    You'll need to understand this structure so that you know which node of rss content to access. (item, title, description, link)
    This would make a nice tutorial or blog post showing workflow from Photoshop > Flash Catalyst > Flash Builder.
    Best,
    Tanya

  • RSS feed on new software

    Hi,
    My customer indicates that he is subscribed to an XML RSS feed regarding software downloadable from OTN.
    One of my customers wants to have the following enhancement added to the OTN website:
    When new software is available, he wants to receive an update that new software has been posted on OTN, instead of him manually checking OTN over and over again to see whether new software has been published.
    Kind regards,
    Michael Verheij

    Isn't the RSS feed serving this purpose?
    Regards, OTN

  • Download RSS feed as xml file from Sharepoint Online using PowerShell

    Hello
    Our company sharepoint (Office 365) contains also several RSS feeds.
    How it is possible to download xml file out of this feed (website) using PowerShell?
    I can authenticate with sharepoint using CSOM but do not what to do next.
    As service user is not administrator I cannot use "SPOService".
    This script works OK for standard website, but not for Sharepoint.
    $doc = New-Object System.Xml.XmlDocument
    $doc.Load("http://www.{CompanySite}.com/feed/")
    $doc.save("C:\temp\feed.xml")
    I am getting this error when using for company Sharepoint:
    "The remote server returned an error: (403) Forbidden."
    Thanks for your time considering this question.
    Jozin

    Hi Scott,
    thanks for advice.
    Combination of WebClient and Sharepoint Credentials is working OK:
    $client = New-Object System.Net.WebClient 
    $client.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, $SecurePassword)
    $client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
    $client.DownloadFile($SiteURL, $file)

  • Newbie here trying to load an rss feed thru xml in Flash AS 2.0

    I have never looked into RSS feeds before, I now have someone that wants  Yahoo rss newsfeed  embedded in his main.fla. I have an AS 2.0 rss newsreader he sent to me, knowing nothing about RSS I started to look around and eventually got to a point where I went to a Yahoo RSS feed and copied the source page and dropped it in the xml file that came with the feedreader. When saved, published and uploaded to the server the file displays the feed from yahoo fine, but it never update the stories. I would think this has to do with the xml as it is embedded in the page so it can't change so my question is how do I get an rss feed converted to xml to update???
    I gotta be missing something here, I hope this isn't too dumb of a question.
    RD

    Yep, as I suspected a dumb question. All I had to do was replace the xml file name with rssurl and it worked.
    sorry guys. I have another question regard this I will post separate.
    rd

  • RSS Feed XML iView Suffix

    Hi,
    we created a XML iView for a RSS Input. Out problem is, if the rss - feed ends upon .xml everything work fine. Unfortunatly our RSS - feed URL does not end with .xml and so the iView produces only an error message.
    Does anyone know how to configure the iView to run without the xml suffix? (We are not able to manipulate the RSS feed)
    Greetings

    sorry bur i don't know!
    Edited by: ludovic roux on Apr 3, 2008 2:23 PM

  • Metadata on iPod from RSS feed (podcast) - ID3 tags or XML-generated?

    Hi,
    Does the metadata on an iPod come from the ID3 tags or from the XML-generated content in the RSS feed?
    Thanks!

    Afterthought:
    My experience is generally with tweaking tags to get iTunes to merge feeds but if you are downloading podcasts directly to the iPod it may concentrate on the feed information. Short of running tests with deliberately different information in the feed & the tag it is hard to say.
    tt2

  • Generating RSS Feeds using files with extension .xml

    Bonjour!
    Apologies if this is not the correct forum - please redirect me if necessary.
    I am trying to create an .xml file to upload to my server allowing me to generate rss feeds on my web site. If i understand correctly (I am a beginner webmaster) for my RSS feed to be valid, the first line must read for example '<?xml version="1.0" ?>
    <rss version="0.91"> which is the case in my document until I save it! When I try to save the text file as .xml MAC OSX treats it as a Word File. I have tried saving as .txt with the same result. Trying to change the extension once the file has been uploaded to my server doesn't work either - the RSS feed validators still pick the document up as a Word file.
    http://www.immobilier.rimcka.com/rss.xml
    Could you advise, please?
    Merci

    What APP are you using to save it?
    Might drop it on FileWiz and see if it has a Type/Creator code.
    Might give BBEdit a look/try...
    http://www.barebones.com/products/bbedit/
    http://www.barebones.com/products/bbedit/featuresweb.shtml
    "Syntax coloring and function navigation support for HTML, JavaScript, Perl, PHP, Ruby, SQL, XHTML, XML, and YAML Improved!"
    Or any of these...
    http://www.versiontracker.com/php/qs.php?mode=basic&action=search&str=xml+edit&s rchArea=macosx&submit=Go

Maybe you are looking for

  • Print module - print to file options

    When creating JPEGs using the Export function of the Library module, Lightroom 4 offers you very detailed control over the export options, including automated rules for the folder/filename structure. When creating JPEGs using "print to file" in the P

  • Crashing at start up...then after sleep, two problems, same reason?

    new macbookpro 2.2. Since purchase it has been crashing at first start up every morning -long lines with pixels and smal squares with piwels in the background- Once it starts the 2nd time works wonderfully until I put it to sleep. Then wakes up norma

  • Printhead problem on L7680

    We have two of these All In Ones and had "patchy" black printing on one even after repeated head cleaning so we decided to use the Black/Yellow printhead from our "good" printer in the "patchy" one. When we did this, the "patchy" printer said "The fo

  • How can I back up all my apps in IPad 2 ?

    I need to back up all my apps from my ipad2 and thanks / because of a glitch in the operating system I had a an dollar account in Tanzania (weird I know) and apple cannot give me access to my apps to download again (should they be deleted or I upgrad

  • Installing Oracle 8i Enterprise Edition on NT Workstation

    I got an error: "An error during runtime." when I try to install Oracle 8i Enterprise Edition (8.1.6) on a Windows NT Workstation Machine, could anyone tell me why it happens? Thanks