Dynamically updating XML

Does anyone have any recommendations for the best way to
dynamically add new content to an xml file?
I have tried to write to the file from a php form using
fwrite, but encountered a snag when trying to get the php page to
write the new xml to the second to last line instead of the last
line.
Is there a better solution for making the updates? I have a
simple xml page that contains an id, date, name and price and would
like the data to be updated from a web form. It will be referenced
on a website in a table and various charts depending on the date or
id#.
Any tutorials with downloads would be much
appreciated!

I DID find a solution with setInterval, but there is still a
problem of a diffeent sort.
When using XMLConnector, it appears that
XMLConnector.trigger() is the thing that goes out and gets new data
from the server. so:
function checkForData():Void {
myXML.trigger();
<<handle new values of bound data>>
var intervalID:Number = setInterval(checkForData, 10000);
works very well by executing the trigger every 10000
timeunits. This all works when run in the Flash Player. However, if
I embed the thing in a webpage (with either FireFox or IE7 or 6),
It stops triggering after the first time. Interestingly if I also
run the Flash Player version, then the web version keeps updating,
but stops if I kill the Player. So, I'm wondering: whats up with
this?

Similar Messages

  • Dynamic update of EJB/Web deployment descriptors

    In 8.1SP3, is there any provision to allow for dynamic update of EJB/Web deployment descriptors? I'm specifically looking at env var changes.
    I noticed that there are some mentions of the ability to dynamically update deployment descriptors, but it appears that the general facility has been deprecated, and they've incorporated all of the WebLogic-specific descriptor information directly into the console.
    When I dig through the JMX namespace and some of the MBean classes, I also see mentions of "deployment descriptor editors", but it's not clear how to utilize that.
    I'm aware of the fact that my application would have to be aware of possible dynamic updates to the descriptors, so I'd have to be able to implement some sort of listener for that.

    I have the same question but for a different purpose. I am part of a hosting group and we have app teams that have defined init-params in the web.xml that have to be changed as the app is promoted up through test environments and ultimately to production - only we need to be able to do this WITHOUT "cracking open" the archive.
    I was hoping to be able to script something to do the update after deployment.
    So any help at all would be appreciated. In the meantime will continue to poke around in the WLST and MBean docs.
    Thanks,
    Ed

  • Howto dynamicly bind XML element to a TextInput using BindingUtils?

    The question is: Howto dynamicly bind XML element to a
    TextInput component using BindingUtils?
    Now I use following codes:
    <!--
    [Bindable] private var xml: XML =
    <item><label>list1</label></item>;
    // initialize code for application's initialize event
    private function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", xml, "label");
    //click event
    private function test(): void {
    xml.label = "something";
    // txtDemo.executeBindings(); //---- no use anymore
    -->
    <mx:TextInput id="txtDemo"/>
    <mx:Button label="Test" click="test()"/>
    My really idea is when bindable xml property is changed, then
    the textinput will be updated as hoped. However, no update happens
    to me when I click the Test button.
    But, if I make codes like that:
    <mx: TextInput id="txtDemo" text="{xml.label}"/>
    the text will updated when xml changs.
    So, what happened, I indeed need the dynamicly bind to the
    textinput compont.
    Help me. thanks.

    You could use an ObjectProxy since all subproperties will
    then be bindable:
    private var _xml:XML =
    <item><label>list1</label></item>;
    private var _opXML:ObjectProxy = new ObjectProxy(_xml);
    then in your init() function you declare _opXML as the host
    object with the bindable property "label"...
    // initialize code for application's initialize event
    public function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", _opXML, "label");
    //click event
    private function test(): void {
    _opXML.label = "something";
    You'll notice that if you check your original _xml.label
    property with ChangeWatcher.canWatch(), it returns false. But if
    you create a dedicated object with a property that can be declared
    as bindable, canWatch() returns true. You'd probably be best off to
    write a lightweight class that can act as your model if you want to
    work with dynamic XML binding using Actionscript. This will allow
    you to use a bindable getter and setter that will give you the
    dynamic functionality you're looking for.
    Hope that helps.

  • HTTPService not reading updated xml, i've been having to refresh the xml in my browser manually

    I am calling an HTTPService (id=data2php) which runs a php
    script which creates an xml doc and puts it on my server. i then
    call another HTTPService (id=feedRequest) which reads the xml doc.
    i then try to populate a datagrid with the lastResult of my
    HTTPService that reads the xml doc. My issue is that that the
    HTTPService which reads the xml doc reads the previous incarnation
    of the xml doc, not the newly created one that my HTTPService
    (data2php) created. i've been manually going to the xml doc in my
    browser and hitting refresh for my feedRequest HTTPService to read
    the updated xml.
    here is the mxml for the httpservice that reads the xml:
    <mx:HTTPService id="feedRequest" url="
    http://cfcdi.org/eric/dashboard/php/sales.xml"
    result="feedResult(event)" resultFormat="xml" useProxy="false"/>
    pretty straight forward.
    (actually, once in a while it will read the updated
    one)

    LittleMuscle,
    Instead of binding to the lastResult property, I would
    explicitly handle the result and fault events of the HTTPService
    (the one that reads the newly created xml doc) and then manually
    update an XMLListCollection for use as the datagrid's dp. That way,
    you can at least walk through the debugger and see what's going on,
    and force the second HTTPService to read only when you're sure the
    newly created doc is ready.
    Since you said it works sometimes and not other times, it
    sounds like it's just a timing problem, sometimes the xml doc is
    created quickly enough that the HTTPService grabs the new xml doc,
    but if not, it's grabbing the old one. That would be my
    guess.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • How can i dynamically update a table in my program?

    Hi there!
    I would like to know if anyone can assist me with advice on how to dynamically update
    a table within my program, with new values from the database?
    Thanking You all.

    Add rows to its model.
    Kind regards,
    Levi

  • Dynamic update of safety stock in SAP R/3 systems (ECC 5.0 version)

    Hi Friends,
    Forgive my newness to SAP. Let me explain the problem i am facing in SAP. I want to identify the parameters to dynamically update the finished goods safety stock for each depot by SKU wise.
    Current process :- Safety stock is calculated manually and updated by using Transaction code MS02 in the system.
    It would be highly useful if i know the flow in SAP system and how the current process can be changed?
    If more info is required i'm ready to give.
    Thanks in advance

    Hi Mario Adler,
    Thanks a ton for ur answer.
    Will it update safety stock for finished goods in each depot by SKU wise? Raw material safety stock isn't my concern.
    project description :  Manufacturer of chemical goods , 70+ products,350 skus
    Distribution : factory to depot (bulk volume)
                          Mother go-down to depot(Stock transfer)
                         No of depots :33,factory:3,mother go-down -1
    Sales forecasting is done in excel for every month and updated to SAP via  BAPI. After that DRP,MRP and other runs takes place.
    What are all the areas i need to touch in to get the parameters to update the safety stock?
    Regards
    Arasu
    Edited by: Arasu_IIM on Apr 26, 2011 12:52 PM

  • How to dynamically update columns in a where clause to a SQL query in OSB?

    Hi Gurus,
    I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
    For example:
    If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
    We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
    I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
    Thanks in advance
    Surya

    I solved my problem.
    In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
    Thank you to who took some time to think about it.
    Marc

  • Please help! Ipod not dynamically updating smart playlists!

    I have quite a complex system of smart playlists on my 4G color ipod but I can't get any of them to update dynamically away from the computer. I have a total of 6 and here are their preferences:
    SPL 1:
    match ALL
    1) My rating is in the range 4-5 stars
    2) Last played is not in the last 1 day
    3) Last skipped is not in the last 1 day
    4) Playcount is less than 5
    limit to 100 by most recently added
    SPL 2:
    match ALL
    1) My rating is in the range 0-3 stars
    2) Last played is not in the last 1 day
    3) Last skipped is not in the last 1 day
    4) Playcount is less than 4
    limit to 55 songs by most recently added
    SPL 3:
    match ALL
    1) My rating is in the range 3-5 stars
    2) Last played is not in the last 1 day
    3) Last skipped is not in the last 1 day
    4) Playcount is greater than 5
    limit to 30 songs by random
    SPL 4:
    match ALL
    1) Last played is not in the last 1 day
    2, 3, 4) Playlist is not SPL 1, SPL 2, or SPL 3
    limit to 15 songs by random
    Unwanted:
    match ANY
    1) Time is greater than 15 minutes
    2) Genre is Comedy
    The active playlist that I use to listen to:
    match ANY
    1-4) Playlist is SPL 1, SPL 2, SPL 3, or SPL 4
    5) Playlist is not Unwanted
    So here's the problem. When I sync with my computer, the playlists work great, everything updates as expected and I get a pretty diverse playlist every time I sync which I want. The problem is that while I'm listening to my music on the ipod away from the computer, my playlists don't dynamically update. After I listen to a song, the song's supposed to remove itself from the playlist which doesn't happen, as well as when I skip songs. Even when I rate songs that aren't rated they don't appear in any playlist. This is really frustrating and I can't find a solution anywhere and yes, I do have Live Updating selected. I also have "Match only checked items" selected on all playlists as well. If anyone has any ideas for how to fix this, I would love to know. Thanks!

    I was searching this forum and found someone who says that 4th gen ipods have problems live updating smart playlists if the criteria "last skipped" is on the playlist. I took this off of all of my playlists but they still don't work. Then I tried making a playlist that is just "rating is equal to 5 stars" and it WORKS!!! But that doesn't help me out much for my other playlists so maybe it's some other criteria that's causing the problem. Any ideas?

  • Dynamically Updating Content Server Portlets

    [urlHi, I am currently having difficulty dynamically updating content server portlets.  I have a portlet of the following form:[/url]
    ArticleName Author Title Date mystory author1 title1 04/05/01
    story2 author2 title2 06/07/04
    story author3 title3 01/02/03
    So I have this table where each one of the line items is an article in the content server. So, for example the first line item is an article "mystory" by "author1", with title "title1" and date "04/05/01" additionally there is an article text field, but this isn't displayed unless I click on the article name.
    I can set up the basics of this portlet, but when I try to add any real functionality I run into one of two problems.
    First Problem: Passing Information
    I cannot find a way to pass information between content portlets. For instance, if the user would like to "re-sort" this table based on "date", I would like to have the user click on the "date" column heading and then reload the page. To do so, I would have to pass the section name back to the page so that it could resort based on this data. I have not found anyway to effectively pass information to a content server portlet. I am building these pages through use of the presentation template framework (so I can have access to the content items) but that seems to change the way portlets are handled.
    I got around this limitation with a regular portlet by creating an intermediary page which captures passed information and stores it to the session state. Once the information was in the session state, it is accessible to the portlet on the first page. However, this only works because remote portlets do not change their session id once loaded. Content Server portlets, on the other hand, change their session id after every reload of the browser or page change. I can send information from a content server portlet to an intermediary page, but I cannot send it back to the portlet because the session id has changed so I have no idea of knowing where to send the information. I can write it to a session state, but by the time I return to the portal page, the content server has changed its session id so it does not know where to look any longer.
    I suppose it would be possible to create an application state variable and append it with some static token (if there is some static variable per portal session) but I would rather not have to deal with application variables if at all possible.
    Second Problem: Dynamically Updating PCS Tags
    Even if I were able to the pass information back to my content server portlet, I run into another issue. The easiest way to sort content server items is using the filter command in the pcs:foreach tag. So, if I wanted to sort by author name, I could do something like the following <pcs:foreach var="item" expr="filter(folderByName('content'), filtered.name == '"name")" or something like that (the syntax may be incorrect, I just wrote this off the top of my head). However, it appears that the way the presentation templates are compiled goes in the order of PCS tags THEN JSP. So I would have no way of dynamically changing the variable on which I sort. For example, if I clicked on "Date" above in my table, I would like to be able to dynamically change my code so that I sort on date, and not name. I cannot find a solution to this problem.
    My workaround is to use the pcs tags to write out all the possible sortings to java array objects. This gives me access to the data on a JSP level and based on whatever the user will chose, I could then display that array. While this works, it is extremely ghetto and inefficient. Any help or suggestions would be fantastic.
    Thanks a lot,
    Jason Grauel

    You can use just about any javascript you want in any Content Server presentation template including ones that are used for portlets.
    However, you should be careful to name javascript functions and global variables uniquely so that they do not conflict with any other javascript on the page. To do this, you can append the item id to function and variable names, for example,
    function doSomething<pcs:value expr="pcs_id"></pcs:value>() {
    return true;
    Randy

  • I did the update to 3.6.11 - when it restarted it will not open any pages. When i go to check for updates it gives me this error: Update XML file malformed (200) - Any advice?

    I did the update to 3.6.11 - After it started Firefox it would go to the requested site in the addressbar, but the page would be blank. I went to check for updates and it told me there was a problem in updating. It gave me this error message: Update XML file malformed (200)
    I uninstalled and reinstalled and the same problem exists.
    Any advice?

    For the error message see [[AUS Update XML File Malformed 200]].
    As it appears not to be able to load any sites, a possible cause is your firewall blocking the new version of Firefox. For more details see [[Firefox cannot load websites but other programs can]].

  • Problem with Dynamic Update in Humax MHP STB.

    Anyone encounters this problem b4?
    The dynamic update funtion of my app works well on other STB, except Humax, no update is reflected.
    I really don't know what to do to made it works now. Anyone can give a hint?
    What I can think of is implementing a Thread which keeps track of dynamic content. However, I can't think of the way to do it properly...

    Anyone encounters this problem b4?
    The dynamic update funtion of my app works well on other STB, except Humax, no update is reflected.
    I really don't know what to do to made it works now. Anyone can give a hint?
    What I can think of is implementing a Thread which keeps track of dynamic content. However, I can't think of the way to do it properly...

  • HTTPS, DNS and dynamically updating DNS records

    Hello to you all, if you are able to help with a DNS problem that I'm having then please accept my thanks and appreciation in advance.
    First some background information, I recently  moved my server from my studio to my house where a new purpose built studio will soon be erected. At my old studio any requests for myurl.com came in via the IP (whether that be http, https, ftp etc) from the domain registrar and the router would send the request to the relevant port number whether that be 80 for http or 443 for https etc and all was well as this location had a fixed IP address. Unfortunately at my new location whilst I have a much faster connection I do not have a fixed IP. To get around this I have the following set up (not ideal for a business I know but perfectly OK for home hosting); I set up two psuedo nameservers at no-ip.com (ns1myurl.com and ns2myurl.com) which tracks the changes in my IP address and updates its records accordingly, my registrar then sends any requests to these 'nameservers' and no-ip then forwards it on to my server. So far so good.
    The problem arises once the requests get to my server, whilst I have DNS set up, I can only recieve requests from a straight request to the server ie myurl.com will display the site without any problem, but if I then put a www in front of that or try to access the https part of my site (which is set up as a seperate site on the same server) then the server throws an error. I have tried to put an alias (CNAME) into the zone but it does not want to resolve the request. I have searched around but to no avail, I am totally new to DNS so am currently on a steep learning curve and fumbling around in the dark.
    The first thing that I need to get working is the request to be resolved correctly and then (and this is where the real fun starts!) is to dynamically update the IP in the DNS records as the IP changes. I will probably have to get help in on this as I understand that this requires BIND of which I know nothing about, first though I'd like to get the pages to be served up correctly. Advice, hints, tips or links to tutorials all greatly appreciated. Full set up listed below.
    Many thanks, David.
    Xserve PPC G5 running 10.5.8 unlimited set up as standalone OD master
    Xraid
    APC UPS
    CradlePoint MBR1200 Gateway router which acts as the DHCP
    http://myurl.com and https://myurl.com set up as 2 seperate sites and located on the Xraid
    Current DNS setup:
    Primary Zone name: myurl.com with nameservers ns1myurl.no-ip.info and ns2myurl.no-ip.info and allow zone transfers in checked
    Then
    Name
    Type
    Value
    myurl.com
    Primary Zone
            ns1myurl.no-ip.info
            Machine
    12.34.56.78 (external IP)
            ns2myurl.no-ip.info
            Machine
    12.34.56.78 (external IP)
            myurl.com.
            Machine
    12.34.56.78 (external IP)
            www.myurl.com.
            Alias
    myurl.com.
    With the reverse zone looking thus with allow zone transfers being checked
    Name
    Type
    Value
    56.34.12.in-addr.arpa.
    Reverse Zone
            12.34.56.78
            Reverse mapping
            myurl.com.

    Thanks for the reply Camelot, that part though I had already figured out. I now have this working, all I did was change the external IP to the internal one of the server with resolves with the .local machine name and all is working just fine (for now!). As long as I have primary zones set for each site and any alias or services set up on them then everything works well.. The real test will be when my ISP changes the IP, whilst my tests have proved successful the proof will be when they update the address.
    Thanks anyway. David.

  • HOw to update XML file residing in DAM by component JSP in run-time?

    i have made a component which reads xml file residing in DAM.
    Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
    i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
    Can anyone help me out to how to update XML file by component JSP in run-time?

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to update XML Facts in rule author

    Hi,
    since there is not a separate forum for the rules engine and this is tightly related to BPEL, so I thought I'd post the question here.
    what's the process to update XML Facts in the rule author and the BPEL process that is already using the rule repository for decisions?
    for example, if I change the data type on one of the elements in the XML Facts schema from string to int, what do I do next to put such change into the existing rule repository and update the BPEL side of things?
    I have tried re-importing the updated XSD into the rule repository (it's a WebDAV repository), I can see the change in the new definitions for the xsd, and I can also make use of the change to define new rules, in the words, the rule author side seems fine;
    then I copied the updated xsd into my BPEL project that calls the rules engine, and then what should I do next? I can't see any where in jDeveloper I can "update" the decision service partner link, so I just re-deployed the BPEL process with the updated xsd under the rule/xsd folder, but then the same call to the decision service starts failing with a "business exception, cx-fault-actor" but without any more details.
    I haven't added any new rules, only change of data type on one element.
    what am I missing?
    thanks.

    In ALDSP 2.5 (and ALDSP 3.0), non-XA data sources can be updated without writing an update-override. But if you want to do any special processing that is not handled by the default behaviour, or for data services not based on relational databases, in ALDSP 2.5, you can write an update-override.
    In ALDSP 3.0, the update model is somewhat different, I suggest that you peruse the ALDSP 3.0 documentation for a thorough discussion. The documentation is here http://edocs.bea.com/aldsp/docs30/index.html I suggest start with a search on 'update'.
    In ALDSP 3.0, I believe updateoverride feature still exists for the purpose of backwards compatibility (at least it turned up in a search of updateoverride in the 3.0 docs)

Maybe you are looking for

  • Text to Speech does not appear to be working in the new version of Pages

    I have tried several ways to get the text to speech feature to work with the new version of Pages, but haven't yet had success. I use that feature in editing my articles alot, so I guess I'll stick with Pages 09 for now. Anyone found a work around?

  • GX600 4 months old, keyboard Spacebar delete keys not always working!

    Hi There, 4 months ago I bought this gx600 gaming notebook and for some valid reason my keyboard space bar and delete buttons are not working anymore as they should be. Sometimes they work and sometimes they don't. It is very unpredictable. I noticed

  • New windows 8 laptop and 4S sync

    Need help . . . Have been using my Windows 7 notebook to sync and backup the 4S along with the cloud service. Copied the photo, apps, contact, and music to the new laptop with the Windows 8. The issue that I have is that the device recognizes the old

  • Is there anyway to allocate more memory to Dreamweaver?

    I'm developing a several humdred page site with multiple hotspots and DW will frequently crash. I assume it's because it lacks sufficient memory for waht I want. I'm using a 2 x 3 GHz Quad-Core G5with 10 GB 800 MHz DDR2 FB-DIMM. Any suggestions besid

  • PROJECT MRP RUN

    Hi all, During mrp run with md03; Planned orders are created according to respective wbs elements. e.g one planned order will be for wbs 1; second for wbs 2 and so on. is it possible to club the requirement of all schemes? Regards Ramesh Arora