Read the XML response with several root elements

Hello


I am trying to reach the scenario below but unable to do so. Please help urgently.

I get a response of service that has several roots elements.these root items may change during execution of... I need to read items different roots and extract data from its subelements.

Kind regards...

In the hope of an answer...

I guess over time, the service returns just 1 rootnode, but this rootnode property can change

You can use a switch after the invoke

If $response/myroot1
assign $ myroot/response to myroot1_var

If $response/myroot2
assign $ myroot/response to myroot2_var

etc.

in order to check what is in the node root before you assign it to your temp variable
or if you have logic that is specific based on this root node, you can simply implement all these branches in the switch and run a logic there, based on the selected rootnode property

several implementations are possible

Tags: Fusion Middleware

Similar Questions

  • Please help to read the XML with XMLTable

    Hi gurus,

    I'm not very familiar with XML parsing. It seems to me that it should be very easy to get the data. For some reason, I'm having a problem to get the data.

    SELECT *.
    OF e util.hlsr_online_entries,.
    XMLTABLE)
    XmlNamespaces)
       ' http://tempuri.org/ '    as "dt",
    ("urn: schemas-microsoft-com: XML-diffgram-v1" as "dg").

    "/ DataTable / dg:diffgram/DocumentElement/JrShowCustomerHeifers.
    PASSAGE XMLTYPE (e.entry_data)
    COLUMNS
    SeqNo TO the ORDINALITE,
    DocumentID NUMBER PATH "DocumentID",.
    PATH of VARCHAR2 (100) ClubName "ClubName") as test
    WHERE e.ref_id = 33422

    The query above does all the data for me. My hunts is the problem with the tab DocumentElement. I tried a different variant management.

    Please help me to resolve the application

    I have the XML document following the DotNet developer

    <? XML version = "1.0" encoding = "utf-8"? >

    " < DataTable xmlns =" http://tempuri.org/ ">

    < xs: Schema id = "NewDataSet" xmlns = "" "xmlns: XS =" " http://www.w3.org/2001/XMLSchema " "xmlns:msdata ="urn: schemas-microsoft-com: xml-msdata" >

    < xs: element name = "NewDataSet" msdata:IsDataSet = "true" msdata:MainDataTable = "JrShowCustomerHeifers" msdata:UseCurrentLocale = "true" >

    < xs: complexType >

    < xs: Choice minOccurs = "0" maxOccurs = "unbounded" >

    < xs: element name = "JrShowCustomerHeifers" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "DocumentID" type = "xs: int" minOccurs = "0" / >

    < xs: element name = "ClubName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Name" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "FirstName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "PreferredName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Email" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Exhibitor" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "AnimalName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "RegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "DateofBirth" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "NameofSire" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "SireRegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "NameofDam" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "DamRegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Tattoo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "SecondaryTattoo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "UniversalIDNumber" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Tattoo_Location" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Secondary_Tattoo_Location" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "OracleBreedID" type = "xs: int" minOccurs = "0" / >

    < xs: element name = "JrValidationBreedName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "ValidationDate" type = "xs: DateTime" minOccurs = "0" / >

    < xs: element name = "ValidatedBy" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "ValidationComment" type = "xs: String" minOccurs = "0" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < / xs: Choice >

    < / xs: complexType >

    < / xs: element >

    < / xs: Schema >

    < xmlns:msdata = diffgr:diffgram "" urn: schemas-microsoft-com: xml-msdata "xmlns:diffgr =" urn: schemas-microsoft-com: XML-diffgram-v1 ">"

    < DocumentElement xmlns = "" >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers1" msdata:rowOrder = "0" >

    < > 18442 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < > 113 AnimalName < / AnimalName >

    < RegistryNo > C1026447 < / RegistryNo >

    < DateofBirth > 14/01/2013 < / DateofBirth >

    < NameofSire > 808 808 DAYS of MATCH LH < / NameofSire >

    < SireRegistryNo > C961101 < / SireRegistryNo >

    SADIE 7/7 < NameofDam > < / NameofDam >

    < DamRegistryNo > C941067 < / DamRegistryNo >

    < > 113 tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F020 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6383 < / OracleBreedID >

    Beefmaster < JrValidationBreedName > < / JrValidationBreedName >

    < ValidationDate > 2014-11-25T 08: 39:00 - 06:00 < / ValidationDate >

    < ValidatedBy > laineyb < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers2" msdata:rowOrder = "1" >

    < > 18473 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE CORALEE 349 KPH < / AnimalName >

    < RegistryNo > P43461953 < / RegistryNo >

    < DateofBirth > 04/11/2013 < / DateofBirth >

    < NameofSire > PURPLE MOXY 22 X AND < / NameofSire >

    < SireRegistryNo > P43126458 < / SireRegistryNo >

    < NameofDam > TCC CORKY 6603 < / NameofDam >

    < DamRegistryNo > P42457119 < / DamRegistryNo >

    < > 349 tattoo < / tattoo >

    < SecondaryTattoo > km/h < / SecondaryTattoo >

    < UniversalIDNumber > 1194F021 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location > TATTOO - right ear < / Secondary_Tattoo_Location >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 55:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers3" msdata:rowOrder = "2" >

    < > 18474 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > LANGFORDS SWEET N SOUR 4107 < / AnimalName >

    < RegistryNo > 43504761 < / RegistryNo >

    < DateofBirth > 02/03/2014 < / DateofBirth >

    < NameofSire > LH TNT 1017 < / NameofSire >

    < SireRegistryNo > 43199794 < / SireRegistryNo >

    < NameofDam > LANGFORDS LADY 2206 AND < / NameofDam >

    < DamRegistryNo > 43315143 < / DamRegistryNo >

    < > 4107 tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F018 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6398 < / OracleBreedID >

    Hereford < JrValidationBreedName > < / JrValidationBreedName >

    < ValidationDate > 2014-11-24T 14:26:00 - 06:00 < / ValidationDate >

    Validator < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers4" msdata:rowOrder = "3" >

    < > 18475 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE CCC 19A LYDIA < / AnimalName >

    < RegistryNo > P43406978 < / RegistryNo >

    < DateofBirth > 05/02/2013 < / DateofBirth >

    < NameofSire > PURPLE MB WOMANIZER 14UET < / NameofSire >

    < SireRegistryNo > P42945146 < / SireRegistryNo >

    < NameofDam > PURPLE CMCC NASTIA 9U < / NameofDam >

    < DamRegistryNo > P42927201 < / DamRegistryNo >

    < > 19A tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F017 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 55:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers5" msdata:rowOrder = "4" >

    < > 18477 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE SGW EDEN 12 b < / AnimalName >

    < RegistryNo > P43521932 < / RegistryNo >

    < DateofBirth > 02/04/2014 < / DateofBirth >

    < NameofSire > first TIME's a WASTINe 0124 < / NameofSire >

    < SireRegistryNo > 43123163 < / SireRegistryNo >

    < NameofDam > PURPLE SM WONDER WOMAN 160Y < / NameofDam >

    < DamRegistryNo > P43235169 < / DamRegistryNo >

    < tattoo > 12 b < / tattoo >

    < SecondaryTattoo > 12 b < / SecondaryTattoo >

    < UniversalIDNumber > 1194F015 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location > TATTOO - right ear < / Secondary_Tattoo_Location >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 56:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < / DocumentElement >

    < / diffgr:diffgram >

    < / DataTable >

    user12021633 wrote:

    Regarding your suggestion, I've never used the syntax of FLWOR. I'll try to implement if I can make it work.

    "FLWOR is the abbreviation of ' for Let's where Order by Return" and refers to the full form of an XQuery query expression.

    Do you think it would be faster than the way I have the values?

    You have used a FLWOR expression (the 'for' + 'return' part of it) in this post: Re: Please help to read the XML with XMLTable

    And I have already said: do not use in this case.

    Faster or slower isn't the point. Oracle will evaluate the expression in the same way.

    But from a maintenance point of view, it's obviously much easier to use a simple XPath expression like this:

    /DT:GetJrShowCustomerHeifersResponse / dt:GetJrShowCustomerHeifersResult / dg:diffgram/DocumentElement/JrShowCustomerHeifers

  • Unable to read the XML of vCO - permission denied

    Hello guys,.

    I was trying to read/write xml workflows vCO files:

    I'm kinda stuck here, and I'd like to see if someone else has already encountered this problem before, and how solve you this problem?

    No details on this issue will be appreciated.

    Thank you

    DH

    Odd.

    What is your use cases? This file should accessible from an external system or not? If this does not store the file in a resource element is a better option.

  • Read an XML response

    Hello

    I need to read a xml response file that is in the format below.

    <? XML version = "1.0"? >
    < response xmlns = "http://hai" container = "http://www.w3.org/2001/XMLSchema".
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
    < DataUn >
    < ArrayofChar >
    Recno < string > < / string >
    Personname < string > < / string >
    < string > sex < / string >
    < string > age < / string >
    < / ArrayofChar >
    < ArrayofChar >
    < string > 1000 < / string >
    Harini Shankar < string > < / string >
    F < string > < / string >
    < string > 16 < / string >
    < / ArrayofChar >
    < ArrayofChar >
    < string > 1001 < / string >
    Pavithira Shankar < string > < / string >
    F < string > < / string >
    < string > 15 < / string >
    < / ArrayofChar >
    < string > 1002 < / string >
    < string > Valentin < / string >
    F < string > < / string >
    < string > 10 < / string >
    < / ArrayofChar >
    < / data >
    < / answer >

    Is the order of the elements is same every time or you have to use the positional headings identify the order of the elements? If it's the same thing, you can use GetElementsByTagName to get an array of elements of "ArrayofChar" or you can use FindNodes to return an array of XmlNode. The first element of the array would be your headers. The rest of the table would have given. You could loop through the rest and treat lines. You can identify each of the string index: GetChildNode(&idx). Your code should look like this:

    Local Array of XmlNode &rows = &xmlDoc.DocumentElement.FindNodes("/ArrayofChar");
    Local number &rowIdx = 1;
    
    Local XmlNode &headingNodes = &rows[&rowIdx];
    
    While &rows.next(&rowIdx)
       Local string &recNo = &rows[&rowIdx].GetChildNode(1).NodeValue;
       Local string &personName = &rows[&rowIdx].GetChildNode(2).NodeValue;
       ...
       REM ** Process row;
    End-While;
    

    If the order can vary, then perform a loop on the & children headingNode using ChildNodeCount and GetChildNode.

  • OSB: How to read the xml file, which is in OSB project

    Hello

    We have a generic proxy (PG1) reporting and deals alerts, this proxy is called in the pipelines of proxies anothers (P1... PN) in several projects. Each client proxy (P1... PN) PN) before call proxy PG1, configures a variable with syntactic alert or report.

    We thought it would be a good idea to store the specifications for all the proxies of a project as an xml file, so that the proxy PG could read the xml file. This file will be in the OSB project.

    The questions are:
    -proxy can read a xml file that is in the OSB project?
    S ' Please, are all the documentation for this?

    Thank you

    Kind regards

    You can always do customization to work with the properties defined in a XML xquery. The key to this is to use the customization of reference instead of find and replace the customization, similar to the service account customizations.
    Keep your real estate to as properties_dev of env xquery specific xmls, properties_sit etc then apply customization of service proxy xquery reference reference specific correct env.

  • I can't read the .avi files with any program on my system.

    I can't read the .avi files with any program on my system. Have several programs that all of them played before September 2010, like the classic, windows media center windows media player media player, Director of windows, windows, 5.3, video programs video ulead dvd creating toshiba. Nothing works, frustrating not being able to download videos from two different cameras and burn them on DVD. I get an error of almost all the programs, saying that it was unable to load the required component, but I can't determine what this component. I tried to reinstall the codecs again non-joy.

    The free utility GSpot to identify the codec that created
    a .avi file... maybe it will help solve the problem:

    Download GSpot
    http://www.free-codecs.com/download/GSpot.htm
    (left-click the text: "Download GSpot")
    (on the next screen...
    left click: 'Download [GSpot 2.70]')

    You don't have to install it... just unzip the file and
    GSpot.exe left click to launch.

    GSpot Super quick start
    http://www.headbands.com/GSpot/v26x/Quick_Start.html

    Evaluation of video files and Codecs with GSpot
    http://www.windowsmoviemakers.NET/PapaJohn/68/GSpot.aspx

    Good luck.

  • have a multi-record with several unrelated elements blocking, filled by simply calling

    Forms of oracle, I have a form with a block of several recording, with several unrelated elements.
    One of these non-is a basic formula element.
    The formula for this article fills the others not consolidated items.
    A procedure with several out parameters is called.

    For example
    : cmr.id (now the unique id of a database record)
    : cmr.unbound_dummy, with the formula f_fill_blk_unbound_items(:blk.id)
    : cmr.unbound_adres
    : cmr.unbound_contactperson

    function f_fill_blk_unbound_items (p_id in customers.id%type)
    Return number
    is
    number of l_rc;
    Start
    customer_pck.get_adres_and_contactperson
    (p_id = > p_id - IN)
    , p_adres = >: cmr.unbound_adres - OUT
    , p_contactperson = >: cmr.unbound_contactperson - OUT
    );
    Return (0);
    end;

    QUESTION: How can I do something similar in the APEX; have a blocking of multi-record with several elements not related, filled by calling a procedure with several out parameters?

    The suggestion refers to functions in pipeline
    http://www.Oracle-Developer.NET/display.php?ID=207

    This will allow you to select your information you need in a query like

    SELECT * FROM TABLE(table_function)
    

    It should also more powerful than the example of forms.

    Scott

  • MediaPlayer 12 on Windows 7 laptop playing my DVD with the sound; MediaPlayer 11 Windows XP desktop reads the DVD even with no sound: WHY?

    MediaPlayer 12 on Windows 7 laptop playing my DVD with the sound; MediaPlayer 11 Windows XP desktop reads the DVD even with no sound: WHY?

    Hello DebbieMarronYM,

    I suggest watching this thread where the poster had the same problem:
    Mind post x which is currently marked as an answer a lot of different solutions that can be useful.
  • my flash reads the xml, but does not include the php tag...

    my flash reads the xml, but does not include the tag php. I want to read my xml dynamically, Please help me.

    Code:

    Stop();

    function randomOrder (targetArray)

    {

    var _loc2 = targetArray.length;

    var _loc3 = [];

    for (var _loc1 = 0; _loc1 < _loc2; ++ _loc1)

    {

    _loc3 [_loc1] = _loc1;

    } / / end of for

    var _loc4 = [];

    for (var _loc1 = 0; _loc1 < _loc2; ++ _loc1)

    {

    _loc4 [_loc1] _loc3.splice = (Math.floor (Math.random () * _loc3.length), 1);

    } / / end of for

    var _loc5 = [];

    for (var _loc1 = 0; _loc1 < _loc2; ++ _loc1)

    {

    _loc5 [_loc1] = targetArray [_loc4 [_loc1]];

    } / / end of for

    return (_loc5);

    } / / End of the function

    var randomNUM = '? '. n ="+ random (9999);

    _root. LAN = 1;

    var homehead;

    HomeLink var;

    var homelinkwindow;

    var homebg;

    var homeflash;

    lamp var = Array();

    promo var = Array();

    var promobottom = Array();

    var headimg = Array();

    f_xmlwork2 = new XML();

    f_xmlwork2.ignoreWhite = true;

    f_xmlwork2. Load ("banner.php");

    f_xmlwork2. OnLoad = {function (success)}

    If (success) {}

    trace ("XML loaded!');

    f_xmlItemx2 = parseInt(this.firstChild.childNodes[0].firstChild);

    f_totalx2 = f_xmlItemx2.length;

    trace (f_totalx2);

    var _loc12 = 0;

    declarar a fundo imagem

    homebg = this.firstChild.childNodes [0].firstChild.nodeValue;

    f_headimg = this.childNodes [1];

    for (var _loc2 = 0; _loc2 < f_headimg.childNodes.length; ++ _loc2) {}

    Juju = f_headimg.childNodes [_loc2];

    JJ = headimg.push ({headimg: f_headimg.childNodes [_loc2].attributes.headimg, bgimg: f_headimg.childNodes [_loc2].attributes.bgimg, msgimg: f_headimg.childNodes [_loc2].attributes.msgimg, leftthrow: f_headimg.childNodes [_loc2].attributes.leftthrow, rightthrow: f_headimg.childNodes [_loc2].attributes.rightthrow});

    }

    end for

    allpromo = this.childNodes [2];

    jjpromo = allpromo.childNodes;

    for (var _loc2 = 0; _loc2 < allpromo.childNodes.length; ++ _loc2)

    {

    trace (jjpromo, [_loc2],.attributes.title);

    JJ = promo.push ({img:. attributes.img jjpromo [_loc2], title: jjpromo [_loc2].attributes.title, url: jjpromo [_loc2].attributes.url, window: jjpromo [_loc2].attributes.window, info: jjpromo [_loc2] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue});

    }

    end of for

    allpromobottom = this.childNodes [3];

    jjpromobottom = allpromobottom.childNodes;

    for (var _loc2 = 0; _loc2 < allpromobottom.childNodes.length; ++ _loc2)

    {

    trace (jjpromo, [_loc2],.attributes.title);

    JJ = promobottom.push ({url: jjpromobottom [_loc2].attributes.url, window: jjpromobottom [_loc2].attributes.window, info: jjpromobottom [_loc2] Sublst.ChildNodes(1).ChildNodes(0) [0] .nodeValue});

    } / / end of for

    If (f_xmlwork2.loaded is true)

    {

    headimg = randomOrder (headimg);

    for (var _loc2 = 0; _loc2 < f_headimg.childNodes.length; ++ _loc2)

    {

    trace (headimg, [_loc2], .headimg);

    } / / end of for

    play ();

    } / / end if

    }

    }

    trace (f_xmlwork2);

    Stop();

    PHP code:

    <?

    $link = mysql_connect("localhost","rnpac_eco","123");

    @mysql_select_db ("rnpac");

    $dir = "' banner /"; "

    Dir1 $= "" products/img_pro / ";"

    Dir2 $= "" universo/activities / ";"

    $sql = ' SELECT tbl_produto.id_produto, tbl_produto.produto, tbl_produto.legenda, tbl_produto.detalhe, tbl_produto.preco, tbl_produto.produto_cat_id, tbl_detalhe_produto.proprietario, tbl_detalhe_produto.local, tbl_detalhe_produto.qualidade, tbl_detalhe_produto.alcool, tbl_detalhe_produto.acidez, tbl_detalhe_produto.ph, tbl_detalhe_produto.informacao, tbl_detalhe_produto.gestor, tbl_detalhe_produto.condicionamento, tbl_detalhe_produto.detalhe_t, tbl_detalhe_produto.interesse, tbl_detalhe_produto.transporte, tbl_detalhe_produto.produto_id, tbl_imagem_produto.id_imagem tbl_imagem_produto.imagem1, tbl_imagem_produto.imagem2, tbl_imagem_produto.imagem3, tbl_imagem_produto.imagem4, tbl_imagem_produto.imagem5, tbl_imagem_produto.imagem6

    OF tbl_cat_produto, tbl_produto, tbl_detalhe_produto, tbl_imagem_produto WHERE tbl_produto.id_produto = tbl_detalhe_produto.produto_id AND tbl_produto.id_produto = tbl_imagem_produto.produto_id ORDER OF RAND()';

    $resultado = mysql_query ($sql)

    or die ("Nao faith possible realize a consulta.');

    $row1 = mysql_fetch_array ($resultado);

    $sql = "SELECT tbl_sub_universo.id_subuniverso, tbl_sub_universo.subuniverso, tbl_sub_universo.universo_id, tbl_actividade.id_actividade, tbl_actividade.entidade, tbl_actividade.legenda, tbl_actividade.subuniverso_id, tbl_actividade.det, tbl_actividade.preco, tbl_actividade.data, tbl_detalhe_actividade.actividade_id, tbl_detalhe_actividade.periodo, tbl_detalhe_actividade.descricao, tbl_detalhe_actividade.programa, tbl_detalhe_actividade.informacoes, tbl_detalhe_actividade.actividades, tbl_detalhe_actividade.localizacao, tbl_detalhe_actividade.locais, tbl_detalhe_actividade.servicos, tbl_imagem_produto.id_imagem. tbl_imagem_produto.imagem1, tbl_imagem_produto.imagem2, tbl_imagem_produto.imagem3, tbl_imagem_produto.imagem4, tbl_imagem_produto.imagem5, tbl_imagem_produto.imagem6, tbl_sub_universo tbl_imagem_produto.actividade_id, tbl_actividade, tbl_detalhe_actividade, tbl_imagem_produto WHERE the tbl_actividade.id_actividade = tbl_imagem_produto.actividade_id AND tbl_actividade.id_actividade = tbl_detalhe_actividade.actividade_id ORDER OF RAND() ';

    $resultado = mysql_query ($sql)

    or die ("Nao faith possible realize a consulta.');

    $row2 = mysql_fetch_array ($resultado);

    ' $query ='SELECT * FROM tbl_banner ORDER OF RAND() ';

    $resultado = mysql_query ($query);

    echo "<?" XML version=\"1.0\"? " >

    < home_left_headline >

    < bgimg > '. $dir2. ". $row1 ['imagem1'].' < / bgimg >

    < / home_left_headline >

    < home_flash > ';

    While ($row = {mysql_fetch_array ($resultado))}

    "" echo "< swf headimg =" ' bgimg = "" msgimg = "" leftthrow = "" rightthrow = "" > < / swf > '; "

    }

    echo "< / home_flash > ';"

    echo "< promotop >

    "< img class =" "title =" "" url = "" > <! " [CDATA []] > < / promo >

    "< img class =" "title =" "" url = "" > <! " [CDATA []] > < / promo >

    < / promotop > ';

    mysql_close ($Link);

    you would not see this trace php if your php has been setup correctly.  Upload your files and repeat the test.

  • Get the table to an XML file with several bays

    Hello

    So I was faced with this program I have for the past few months but I'm almost there. I have a program that creates several berries and place one after the other in an xml file, and each table has its unique name. Now, I would create a VI that takes this XML file and when the user enters the name of the table specific they are seeking it goes into the xml file concludes the table in its entirety under this name and displays in an indicator of output to be read on the VI. A sample of my xml file and the VI that creates this xml file is attached.

    Thank you

    dlovell

    Something like this should work for you.

  • How to read the XML doc in variable with XPath?

    Suppose that a variable in BPEL contains an entire XML document as (without the quotes):

    "value1 < foo > < bar > < / bar > < bar > value2 < / > < / foo >.

    How to read of BPEL an XPath expression with the value of the second
    < bar > element in a nother variable "target"?

    What do I have to use getvariabledata? How to pass the XPath?

    Peter

    Peter

    Here's how you can get there by business to be divested. You can access it by writing the XML expression (do not select foo--> bar directly on the tree) as below

    bpws:getVariableData ('Variable_name', 'Foo','/ NS4:foo / NS4:barbpws:getVariableData("intCounter")') and assign it to the variable "target". Here the value of the variable integer "intCounter" represents the nth element under the tag "foo". Let us know if you face any issues.

    Hope this will help.

  • Loading the XML file with the missing elements dynamically by ODI

    Hi guys,.

    I have the XML with two nodes Employee and address below. On a daily basis, sometimes the address element might not come from the source xml file, but my interface has columns mapped to the elements of the address, and that is why it may fail because of the source element is not found in the file or data could not get charged because the State 'and' in the sql query that is generated between the employee and address elements.  Is there a way where I can load the data dynamically where I can search in the file only for items (used) present and dynamically loading data only for these items?

    XML file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < EMP >

    < Empsch >

    < employee >

    < EmployeeID 12345 > < / EmployeeID >

    < original > t < / initials >

    John < name > < / LastName >

    DOE < FirstName > < / name >

    < / employee >

    < address >

    < > 12345 as WorkPhone < / as WorkPhone >

    < WorkAddress > test 234 < / WorkAddress >

    < / address >

    < / Empsch >

    < / EMP >

    Thank you

    Fabien Tambisetty

    I managed to solve it by using left outer joins, and in referring to the structure of the table of the XSD

  • Generate the XML file with elements and attributes in table Oracle

    Hello

    I have the following table structure.

    CREATE TABLE SPOOL
    (
    COIL_ID NUMBER (10),
    COIL_NUMBER VARCHAR2 (40),
    COIL_PO_OPERATING_UNIT VARCHAR2 (20).
    COIL_PO_NUMBER VARCHAR2 (40),
    MILL_NUMBER VARCHAR2 (2),
    MILL_COIL_STATUS VARCHAR2 (15).
    ITEM_NUMBER VARCHAR2 (40),
    COIL_WEIGHT NUMBER (38),
    WEIGHT_UOM VARCHAR2 (10),
    DOCUMENT_NUMBER VARCHAR2 (40),
    DATE OF DOCUMENT_DATE,
    DOCUMENT_STATUS VARCHAR2 (15).
    DOCUMENT_TYPE VARCHAR2 (20).
    DOCUMENT_SOURCE VARCHAR2 (20).
    TEST_ID NUMBER (38),
    NUMBER VALUE,
    TEST_UOM VARCHAR2 (20).
    TEST_STATUS VARCHAR2 (70).
    TESTER_LOGIN VARCHAR2 (20).
    EQUIPMENT_CODE VARCHAR2 (50).
    DOC_STS_MSG VARCHAR2 (600)
    )
    /
    For each record COILID, there could be several folders baased on TEST_ID/VALUE/TEST_UOM etc.

    And I would like to prepare the xml file in the following format by selecting data in the COIL?


    <? XML version = "1.0"? >
    -coil xsi: noNamespaceSchemaLocation = "www.tempel.com/COIL.xsd" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb = "http://xmlns.oracle.com/xdb" >
    < CoilId > 1419532 < / CoilId >
    < CoilNo > D2221050010A0 < / CoilNo >
    Changzhou < CoilPOOperatingUnit > < / CoilPOOperatingUnit >
    < CoilPONo > 4619 < / CoilPONo >
    < MillNo > 86 < / MillNo >
    Test of < MillCoilStatus > < / MillCoilStatus >
    C5 050FP800 < ItemNo > < / ItemNo >
    < weight > 7076 < / weight >
    KILOGRAM of < GLU > < / UDM >
    < DocumentNo > 0 < / DocumentNo >
    < DocumentDate > 2013 - 01 - 11 < / DocumentDate >
    < DocumentStatus > not < / DocumentStatus >
    < DocumentType > test < / DocumentType >
    CHIGMA1 < DocumentSource > < / DocumentSource >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4992" TestUnit = "mm" Status = 'NonProcessed' TestId = "135" / >
    < test DocStsMsg = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.0128" TestUnit = "mm" Status = 'NonProcessed' TestId = "124" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "12" TestUnit = "mm" Status = 'NonProcessed' TestId = "125" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5095" TestUnit = "mm" Status = 'NonProcessed' TestId = "127" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5042" TestUnit = "mm" Status = 'NonProcessed' TestId = "128" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5058" TestUnit = "mm" Status = 'NonProcessed' TestId = "129" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4967" TestUnit = "mm" Status = 'NonProcessed' TestId = "130" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5049" TestUnit = "mm" Status = 'NonProcessed' TestId = "131" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4972" TestUnit = "mm" Status = 'NonProcessed' TestId = "132" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4960" TestUnit = "mm" Status = 'NonProcessed' TestId = "133" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4996" TestUnit = "mm" Status = 'NonProcessed' TestId = "134" / >
    < / reel >

    Can you please guide me how to do it in a single query?

    Thanks in advance.

    Function EXTRACT will force a print in your version:

    SELECT XMLElement("Coil",
             XMLAttributes(
               'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
             , 'www.tempel.com/COIL.xsd' as "xsi:noNamespaceSchemaLocation"
             )
           , XMLForest(
               COIL_ID                as "CoilId"
             , COIL_NUMBER            as "CoilNo"
             , COIL_PO_OPERATING_UNIT as "CoilPOOperatingUnit"
             , COIL_PO_NUMBER         as "CoilPONo"
             , MILL_NUMBER            as "MillNo"
             , MILL_COIL_STATUS       as "MillCoilStatus"
             , ITEM_NUMBER            as "ItemNo"
             , COIL_WEIGHT            as "Weight"
             , WEIGHT_UOM             as "UOM"
             , DOCUMENT_NUMBER        as "DocumentNo"
             , DOCUMENT_DATE          as "DocumentDate"
             , DOCUMENT_STATUS        as "DocumentStatus"
             , DOCUMENT_TYPE          as "DocumentType"
             , DOCUMENT_SOURCE        as "DocumentSource"
             )
           , XMLAgg(
               XMLElement("Tests",
                 XMLAttributes(
                   DOC_STS_MSG    as "DocStsMsg"
                 , EQUIPMENT_CODE as "EquipmentCode"
                 , TESTER_LOGIN   as "TesterLogin"
                 , VALUE          as "Value"
                 , TEST_UOM       as "TestUnit"
                 , TEST_STATUS    as "Status"
                 , TEST_ID        as "TestId"
                 )
               )
             )
           ).extract('/*')
    FROM coil
    GROUP BY COIL_ID
           , COIL_NUMBER
           , COIL_PO_OPERATING_UNIT
           , COIL_PO_NUMBER
           , MILL_NUMBER
           , MILL_COIL_STATUS
           , ITEM_NUMBER
           , COIL_WEIGHT
           , WEIGHT_UOM
           , DOCUMENT_NUMBER
           , DOCUMENT_DATE
           , DOCUMENT_STATUS
           , DOCUMENT_TYPE
           , DOCUMENT_SOURCE ;
    
  • Help in parsing the XML result with ksoap2

    Hi, I have another problem. I used KSOAP2 to call a web service net but when I catch him to display the result with a selectionneret, it shows the following screen:

    reading on the web, I didn't find a good way to analyze the result. Could you help me with this? Thanks in advance

    Thanks, the problem here is that we use the same webservice for more devices and a web page in .NET) that's why we use this webservice. Anyway thanks for the help. I read a lot of posts and the only way is perhaps to save the XML document in the SD card

  • Analysis the xml response from PL/SQL

    Can someone please help me to analyze the XML below?

    DECLARE

    l_response CLOB.

    g_system_id VARCHAR2 (255);

    g_session_id VARCHAR2 (255);

    g_user_id VARCHAR2 (255);

    BEGIN

    l_response: =.

    ' - uuid:18cb22a2 - 11cc-43f4-bfea-c213da179d30 + id = 156

    Content-ID: http://tempuri.org/0 >

    Content-Transfer-Encoding: 8 bit

    Content-Type: application/xop + xml; charset = utf-8; Type = "application/soap + xml".

    " < s: Envelope = xmlns:s ' http://www.w3.org/2003/05/soap-envelope "" xmlns: a = " " http://www.w3.org/2005/08/addressing ' > < s:Header > < a: s:mustUnderstand Action = "1" > ". http://tempuri.org/ILoginService/LoginByUserNameResponse " < / has: Action > < a: RelatesTo > urn: uuid:cf410a05 - 23 d 4 - 4B 92-a22c-329cbc19fbe7 < / has: RelatesTo > < / s:Header > < Body > < LoginByUserNameResponse xmlns =" http://tempuri.org/ ' > < LoginByUserNameResult xmlns:i = ' http://www.w3.org/2001/XMLSchema-instance "" xmlns: x = " " http://www.w3.org/2001/XMLSchema ' > < XObject.m_element i: type = "x: string" xmlns = "" > & lt; OnlineContext SystemId = "{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId = username "{F23D32A4-B325-4BFA-9E90-39CA253E843C}" = "{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" / & gt; < XObject.m_element > < / LoginByUserNameResult > < / LoginByUserNameResponse > < / Body > < / s: Envelope >

    -uuid: 18cb22a2-11cc-43f4-bfea-c213da179d30 + id = 156-';

    SELECT systemid, sessionid, userid

    IN g_session_id, g_system_id, g_user_id

    FROM XMLTABLE)

    xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' 'DATA'),

    'data:LoginByUserNameResponse/LoginByUserNameResult/XObject.m_element/OnlineContext '.

    PASSAGE xmltype (l_response)

    Systemid VARCHAR2 COLUMNS (50) PATH "@OnlineContext."

    SessionId VARCHAR2 (50) PATH "@OnlineContext."

    UserID VARCHAR2 (50) PATH "@OnlineContext") xt;

    Dbms_output.put_line)

    "Session Id".

    || g_session_id

    || "System Id".

    || g_system_id

    || "User Id".

    || g_user_id);

    END;

    Thank you.

    It gets you a little closer

    declare
    -- Local variables here
    l_response     CLOB;
    g_system_id    VARCHAR2 (255);
    g_session_id   VARCHAR2 (255);
    g_user_id      VARCHAR2 (255); 
    
    begin
    -- Test statements here
    l_response := '
    
        http://tempuri.org/ILoginService/LoginByUserNameResponse
        urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7
    
    
        
           
              
              
          
      
    '; 
    
        SELECT systemid, sessionid, userid
          INTO g_session_id, g_system_id, g_user_id
          FROM XMLTABLE (
                  xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "s",
                                 'http://tempuri.org/' as "data"),
                  's:Envelope/s:Body/data:LoginByUserNameResponse/data:LoginByUserNameResult/XObject.m_element/OnlineContext'
                  PASSING xmltype (l_response)
                  COLUMNS systemid VARCHAR2 (50) PATH '@SystemId',
                          sessionid VARCHAR2 (50) PATH '@SessionId',
                          userid VARCHAR2 (50) PATH '@UserId') xt; 
    
    DBMS_OUTPUT.put_line (
           'Session id '
        || g_session_id
        || ' System id '
        || g_system_id
        || ' User id '
        || g_user_id); 
    
    end;     
    

    You will need to manually parse as CLOB and pull the XML itself of the response string.  This can be done via SUBSTR and INSTR looking for the first < and="" last=""> in that you showed at least.  Upgrading from a previous version of working correctly with the xmlns = "", which redefines the default namespace to the default value. "  The XPath has been corrected to reflect using the appropriate prefix.

Maybe you are looking for