OSMF: How to create resource from XML string

Hello,
I have a URL that sometimes returns a valid playmanifest.f4m and sometimes returns a string represantation of my media URL.
On my loadComplete handler I would like to create the appropriate resource according to the returned data.
If the data is a URL, I just create a StreamingURLResource and create the media element.
Is there a way for me to create some resource that contains the XML? I noticed OSMF has StreamingXMLResource but its excluded, and it doesn't look like it can answer my use case.
Do you have any suggestions?
Thanks,
Michal

Hi Michal,
The baseURL is needed since you might want to use relative urls like in a normal f4m. The parsing had to be kept simple, so we preferred to make the baseURL mandatory and to reuse the f4m parsing code.
You should be able to provide (in the xml string) paths for the streams, bootstraps, etc relative to that base url.
You will not be able to use multi-layer manifest through this technique, though.

Similar Messages

  • How to create DTD from XML using DOM

    Hi,
    Is there a way to create a corrosponding DTD of a xml-file using DOM. I have a XML-file that's pretty huge I want to create a DTD for that XML-file using DOM. Can anyone plz. lead me how to do this. I tried to use XMLSpy to convert the XML into DTD but the resulting DTD is not correct. Is there a way to create the DTD using DOM.
    Any help is really appreciated. Thanks

    When you say you are trying to convert XML to DTD, do you mean you are trying to convert a XSD (schema) to a DTD, or that you are trying to create a schema that corresponds to a given XML document.
    Realize that DTDs are not very powerful. XSD documents allow for much more detail. I don't have a proof, but I'm absolutely confident that any DTD can be expressed as a schema but not all schemas can be represented as a DTD. In other words, DTDs are not worth the trouble, in my opinion.

  • Create Business Partner from XMl String not a file

    Hi,
    Is it possible to create a BP from an XML string. 
    I know about GetBusinessPartnerFromXml(string FileName, int index)
    but I dont want to save the string in a file before creating a BP from it
    Hope there's a method to do that

    Marc,
    This looks like it is a duplicate of this post, so I am closing this thread as it looks like you answered your own question!
    Create Business Partner from XMl String not a file
    Eddy

  • How to use create-nodeset-from-delimited-string()

    Hi All,
    I am getting the input data as following
    name rollno sub
    Anu 1 Maths|science|social
    and the output should be as follows:
    name rollno sub
    Anu 1 Maths
    Anu 1 Science
    Anu 1 Social
    I need to implememt this by using oraext:create-nodeset-from-delimited-string() in XSLT Pls help me out in resolving this issue
    Regards,
    Anasuya

    can u elaborate the query with ur input xml and output xml for clear understanding instead of
    name rollno sub
    Anu 1 Maths|science|social
    and the output should be as follows:
    name rollno sub
    Anu 1 Maths
    Anu 1 Science
    Anu 1 Social
    check the following links it might help u
    http://www.soabyte.com/2011/01/delimited-string-to-xml-nodeset.html
    Edited by: olety on Nov 2, 2011 2:29 AM

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • How to remove Unicode from XML file

    I get following error when unmarshal xml:
    [java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
    Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
    Thanks

    These sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.

  • Error in create-nodeset-from-delimited-string

    Hi Gurus,
    I am trying to use the orcl:create-nodeset-from-delimited-string XPath extension function in the XSL mapper.
    I am using the Map test feature to test my map, and notice that if I use this function, the XSL does not give any output - i guess the map is failing to execute at runtime. When I open the JDeveloper as jdev.exe [so that I can see the command line window for JDev], I can see that an error appears in the command line window that states "Method orcl:create-nodeset-from-delimited-string" not found.
    This XPath function is available for use in the "Advanced Functions" palette in the XSL Mapper.
    Please let me know if
    a) This function can be used within the Mapper, and if so,
    b) whats the right way to use it.
    My usage looks like
    orcl:create-nodeset-from-delimited-string('tns:sampeNode',$delimVar,',')
    where delimVar is a comma delimited string.
    Please let me know your thoughts on this .
    rgds,
    Ram

    Hello..
    Look, I paste a functional piece of code that I develop in a transformation.
    Take this for your example and develop with the same structure.
    BR...Rodrigo
    <xsl:param name="HomeNumber"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:HomePhone"/>
    <xsl:param name="HomeNumberExt"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:HomePhoneExt"/>
    <xsl:param name="WorkNumber"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:WorkPhone"/>
    <xsl:param name="WorkNumberExt"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:WorkPhoneExt"/>
    <xsl:param name="Fax1"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:Fax1"/>
    <xsl:param name="Fax2"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:Fax2"/>
    <xsl:param name="Email"
    select="/tns:GetCustomerResponse/tns:GetCustomerResult/tns:DefaultAddress/tns:Email"/>
    <xsl:param name="contactMedium"
    select="concat($HomeNumber,'-%',$HomeNumberExt,'-%',$WorkNumber,'-%',$WorkNumberExt,'-%',$Fax1,'-%',$Fax2,'-%',$Email,'-')"/>
    <xsl:param name="contactMediumNodeSet"
    select="oraext:create-nodeset-from-delimited-string('contactMediumNodeSet',$contactMedium,'%')"/>

  • How to extract data from XML file with JavaScript

    HI All
    I am new to this group.
    Can anybody help me regarding XML.
    I want to know How to extract data from XML file with JavaScript.
    And also how to use API for XML
    regards
    Nagaraju

    This is a Java forum.
    JavaScript is something entirely different than Java, even though the names are similar.
    Try another website with forums about JavaScript.
    For example here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • How to create data_block from procedure ?

    hi all
    can anyone to help me :
    how to create data_block from procedure ?
    i want to join 2 or 3 table and use order by
    then show some field in my form
    i can not use view because order by can not use in view
    please send sample code for this procedure
    thanks.

    1) >i can not use view because order by can not use in view
    SQL>create or replace view V_test as
      2  select * from (
      3  select 1 id from dual union
      4  select 2 id from dual union
      5  select 3 id from dual union
      6  select 4 id from dual union
      7  select 5 id from dual union
      8  select 6 id from dual ) t
      9  order by t.id
    10  /
    View created.
    SQL>select * from v_test;
            ID
             1
             2
             3
             4
             5
             6
    6 rows selected.2). >how to create data_block from procedure?
    You must create procedure and use ref cursor.

  • How to create report from report painter??

    Hi,
    how to create report from report painter?? from transaction code GRR1

    Select the library that you want report to create.  GRR1
    You select what to list in coulumns and what to lisr in rows. You could select characteristics or key figures.
    You can use variable both in defininig row and coulmn or in general selection.
    You can also use sets as variable or as constant. These sets can be your master data groups or sets in GS02.
    You can use formulas.

  • How to Create PDF from Illustrator CS3 by using applescript?

    Hi Guys,
    Do some one knows how to create PDF from Illustrator CS3 by using apple script. If know, please give me the scripting.
    HARI

    Have you tried File>Scripts>SaveDocsAsPDF? There should be a folder of sample scripts installed in your AICS3 folder and a folder of documentation which contains an Illustrator AppleScript Reference which has examples.

  • How to create "convert from PDF to Word?"

    How to create "convert from PDF to Word?"

    Good day,
    To use the ExportPDF service, simply visit http://exportpdf.acrobat.com and click 'Sign in' at the top right corner.  Enter your Adobe ID (email address) credentials to log into the service.  As ExportPDF is web-based, you simply utilize the tool through your web browser.  After you're logged in, you should see the ExportPDF interface, with a button saying 'Select PDF file..' to get the process started.
    Please let us know if you have any questions.
    Kind regards,
    David

  • How can I read an XML string that's not from an XML file?

    I've got a script I'm trying to setup that communicates over a socket to retrieve different directions from a custom built Java program.  The Java program listens to requests from the Adobe scripting engine (in my case it's a Photoshop script) on a socket and immediately responds with the next set of directions.  These directions are currently in XML format.  The issue I'm having is that I can't parse the XML data since it's entered into a new XML object from a string rather than being read from a file.  Even without the socket code, you can see the issue by doing the following:
    var xml = new XML("<test><data>hey!</data></test>");
    alert(xml.test.data);
    alert(xml);
    The first alert "should" return "hey!" (without quotes, of course), but it doesn't, while the second alert returns what you would expect it to:
    <test>
        <data>hey!</data>
    </test>
    It works fine if read from an XML file, but from a string, like shown above, it just presents an empty alert box when attempting to access "xml.test.data".  Any ideas on how to fix this issue?  Can it be fixed?  Has it been fixed in newer versions (I'm currently using CS4)?
    Thanks in advance for any help!

    Duh... found my error... I was attempting to access the data by referencing the created "root" element.  Since <test> is the very first element tag, it's setup as the root element, which you don't need to reference.  Changing the alert to alert(xml.data); fixed it.
    Now I just feel dumb, lol...

  • How to create/call dynamic XML feed from CFC - HELP PLEASE!!

    Hi All,
    First off I'm a newb to web services.  I'm trying to create the invoke a web service on a CFC for a XML feed.  When I call the CFC directly all looks fine and is correctly formatted etc:
    http://www.prevu.tv/cfc/xyzTest.cfc?method=listPlant
    Am I correct in outputting it in this way?  What if I output as a string instead......would others be able to consume it?
    When I try to invoke it as a web service I am getting an error I do not understand.  I am trying to call it using (user/pass not required in CFC):
    <cfinvoke webservice="test" method="listPlant" returnvariable="foo">
    <cfinvokeargument name="username" value="abc">
    <cfinvokeargument name="password" value="123">
    </cfinvoke>
    <cfoutput><cfdump var="#foo#"></cfoutput>
    Here is my CFC code:
    <cfcomponent>
        <cffunction name="listPlant" access="remote" returntype="xml" output="no">
        <cfargument name="username" type="string" required="no">
        <cfargument name="password" type="string" required="no">
            <cfquery datasource="#request.dsn#" name="getPlant">
            SELECT                *
            FROM                  plant
            INNER JOIN        plantaddress ON plant.plantID = plantaddress.plantID
            WHERE              icePlantID IS NULL
            AND                   categoryID NOT IN (9,10,11)
            AND                   statusID = 1
            AND                   activePlantList = 1
            ORDER BY        plant.plantID LIMIT 5
            </cfquery>
            <!---Convert Query to xml--->
            <cfprocessingdirective suppresswhitespace="Yes">
            <cfcontent type="text/xml; charset=utf-8">
            <cfxml variable="xmlobject">
            <PrevuPlant>
                <cfoutput query="getPlant">
                <Plant>
                    <PlantID>#plantID#</PlantID>
                    <PlantName>#XmlFormat(plantName)#</PlantName>
                    <Street>#XmlFormat(street)#</Street>
                    <Suburb>#XmlFormat(suburb)#</Suburb>   
                    <City>#XmlFormat(city)#</City>
                    <State>#XmlFormat(state)#</State>
                    <Country>#XmlFormat(country)#</Country>
                    <PostCode>#XmlFormat(postcode)#</PostCode>
                    <Latitude>#XmlFormat(latitude)#</Latitude>
                    <Longitude>#XmlFormat(longitude)#</Longitude>
                    <CountryCode>#XmlFormat(countryCode)#</CountryCode>
                    <AreaCode>#XmlFormat(areaCode)#</AreaCode>
                    <Phone>#XmlFormat(phone)#</Phone>
                    <Fax>#XmlFormat(fax)#</Fax>
                </Plant>
                 </cfoutput> 
            </PrevuPlant>
            </cfxml>
            <!---Convert back to a string--->
            <cfset myvar=toString(xmlobject)>
            </cfprocessingdirective>
        <cfreturn myvar>
        </cffunction>
    </cfcomponent>
    Can anyone please tell me where I am going wrong, or how the output for a XML feed called from a CFC should look in a browser etc?
    Thanks

    Hey Dan....thanks for the prompt reply.
    I added the wsdl and this is what I get when I call the service from this cfm page: http://www.prevu.tv/xyzTest.cfm
    Have never seen output like this.  Is this correct?
    The web service I'm writing is also for some .net developers so it may be that I need to output as string also - this discussion has not taken place yet.

Maybe you are looking for

  • Why is my iMac running so slowly?

    EtreCheck version: 1.9.12 (48) Report generated June 17, 2014 at 7:50:21 AM EDT Hardware Information:           iMac (27-inch, Late 2013) (Verified)           iMac - model: iMac14,2           1 3.5 GHz Intel Core i7 CPU: 4 cores           16 GB RAM V

  • Users are having issues w/ the community page for pa.

    It seems other users are having issues with accessing the community page for pa, as noted on URL: http://www.dslreports.com/forum/r22862991-Any-else-out-there-having-issues-w-the-community-page-4-pa Title/Location: DSLR (dslreports.com) Forums -> US

  • Rendu media encoder / after effect dynamic link, modification non prises en charges

    J'ai un projet sous after effect CC. Je le link dans première, ajoute la musique, les sons etc... Je lance un export via media encoder. Je me rends alors compte que je n'avais pas activé le flou de mouvement sur quelques calques dans AE. Je modifie d

  • Data types in ABAP

    what is the significance of initial field and valid field in data type like float,numeric,int etc.

  • Safari Version 8.0 makes content go blank leaving ads OK

    As an "older person," I tend to follow the obituaries on a near daily basis.  During the past month or so, I have run into a quirk where, after scrolling down a few obits, the screen goes blank except for the ads which remain in all their glory.  The