Wanted - XML Tag with AJAX; JSF compatible

Hello, I'm looking for a tag that displays XML in a collapsible format.
So I start with an XML tree displaying level 1 tree info. When the user clicks on a node, it uses AJAX to dynamically pull info associated with the node and displays the XML sub-tree. The user can then click on a sub-node to view the tree associated with the sub-node, or collapse a node and move onto another node.
It needs to be JSF compatible too.
Is this doable and if yes, then could you recommend what hoops will I need to jump through to make it so.
Thanks.
Ciao, Bhishma

Is the XML file being generated on the fly in your servlet? Well, you wrote it, didn't you? So you should know. If your servlet is what you posted there, you aren't even generating XML. You are just generating some text, which isn't XML.
The point is, if you want XML generated then it's up to you to do that. Nothing happens automagically. If you want XML with a "message" element then you have to generate XML with a "message" element.

Similar Messages

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Combing jstl/xml tags with jsf - can't pass parameter

    I'm using the jstl/xml tags to parse portions of an xml document. For some value of an attribute I want to render a search link, many of these links may be rendered on a page and I need to track which one has actually been selected using the id of the generating xml element.
    This is what I've tried, both using h:commandLink and a f:param and t:commandLink (tomahawk) and a t:updateActionListener.
    It doesn't seem to be possible to expose the resolved value of the xpath ="@id" in any way that either the tomahawk or core jsf tags can see.
    <x:when select="$control[@type='SEARCH']">
    <input type="text" id='<x:out select="@id"/>' disabled="true">
    <x:set var="selectedId" select="@id"/>
    <h:commandLink action="#{pack.search}" value="#{msg['actionPack.label.search']}" styleClass="linkNoUnderline">
    <f:param value="${selectedID}" name="selectedID"/>
    </h:commandLink>
    <%--<t:commandLink action="#{pack.search}" value="#{msg['actionPack.label.search']}" styleClass="linkNoUnderline">
    <t:updateActionListener property="#{pack.searchingId}" value="${searchId}"/>
    </t:commandLink>--%>
    </x:when>

    The JSF and JSTL tags don't really play well together.
    Particularly conditional and looping tags.
    My suggestion would be - if you're using JSF, don't use JSTL.
    You are right in that the JSF tags don't bother with the xpath expression.
    Would it be possible to shift the xml logic into an action/bean somewhere, and just present the jsp page with a list of relevant objects?
    If I understand you are trying to determine which link was clicked on a page? In the JSF action "pack.search"?
    What method of iterating are you using? an x:forEachLoop? A datatable?

  • Mapping of XML tags with column

    My xml structure is :
    <PARAMS>
    <ROWSET>
    <ROW NUM="1">
    <SID>man123</SID>
    <PO>
    <PO>OBJ1</PO>
    <PI>
    <PI>PARENTOBJ1 INSTANCE</PI>
    </PI>
    </PO>
    </ROW>
    </params>
    My table structure is :
    CREATE TABLE TEMP(SID VARCHAR2(20),PO POBJECT_T)
    where Object types are:
    CREATE OR REPLACE TYPE PINSTANCE_T AS OBJECT (PI VARCHAR2(255),CO COBJECT_T);
    CREATE OR REPLACE TYPE POBJECT_T AS OBJECT (PO VARCHAR2(255),PI PINSTANCE_T);
    To store this XML directly into table i have to have Column with name "PO" (same as XML tag).I am using this same table to store other XML with same tags . With this limitation its difficult to do so.Is there any way to map XML tag to column with different name????
    Thanks

    Hi,
    thx for your Reply,
    seems to work basicly but i get now in the IDE warnings with:
    "Data binding will not be able to detect changes when using
    square bracket operator. For Array, please use
    ArrayCollection.getItemAt() instead. "
    And how can i access the next item something like this didnt
    work right
    try someniceid.lastResult["some-root"]["someother-root"]
    I had to use single quotes (') to get it to work.
    Any ideas?
    Kind regards,
    Marko

  • Embedding inline HTML data in XML using the mx:XML tag with &lt; and &gt;

    What is best practice for embedding HTML within the
    <mx:XML> tag? Programmatically, I can implement this
    successfully:
    [Bindable]
    public var xmlDP:XML = <component data="&lt;" />;
    However, I get the following error if I try to store the same
    data inline in an mx:XML tag, as such:
    <mx:XML id="xmlDP">
    <component data="&lt;" />
    </mx:XML>
    Error #1095: XML parser failure: Unterminated attribute.
    If I change the MXML tag as follows, it works fine:
    <mx:XML id="xmlDP">
    <component data="&amp;lt;" />
    </mx:XML>
    Unfortunately, I also can not source the mx:XML tag to an XML
    file which uses &lt; or &gt; codes, as it yields the same
    results. This leads me to believe that the <mx:XML> tag does
    not support the special character codes for < and >, but why?
    Incidentally, this code also gives a 1095 error:
    <mx:XML id="xmlDP">
    <component data="&#0060;" />
    </mx:XML>
    This is causing an issue with my source data as it is not
    hand typed into Flex, and standard XML supports the &lt; and
    &gt; codes. I have tried a full HTML string, as shown below,
    but this also generates the error:
    <mx:XML id="xmlDP">
    <component data="&lt;b&gt;Test&lt;/b&gt;"
    />
    </mx:XML>
    Many thanks for any input you may have!

    I’m generating the XML source file with
    Microsoft’s XML Notepad 2007. It will encode invalid special
    characters automatically. My understanding is that this is the
    proper way to handle the less than symbol in a XML string, that is
    to say using the &lt; code.
    With respect to the escape and un-escape methods, I am able
    to successfully implement these in AS, but not in MXML. This makes
    sense considering they are AS methods, but I was hoping to be able
    to do something like:
    <mx:XML id="xmlDP">
    <component data="escape('<');" />
    </mx:XML>
    This gives the following compilation error:
    The value of attribute "data" must not contain the '<'
    character.
    As does using the escape character as such:
    <mx:XML id="xmlDP">
    <component data="\<" />
    </mx:XML>
    Below is an example of what the escape character may be used
    for in AS:
    var myString:String = "\"";
    trace(myString);
    // result: "
    Likewise, I can escape the < character as such:
    var myString:String = escape("<");
    trace(myString);
    // result: %3C
    <mx:XML id="xmlDP">
    <component data="%3C" />
    </mx:XML>
    trace(un-escape(xmlDP.@data));
    // result: <
    As you can see, using %3C and unescaping in AS will yield the
    correct result; however, this is not a practical method of
    representing the data in MXML as I would have to write an AS method
    to un-escape the XML string anyway, so I might as well just store
    the data in AS to begin with. I was hoping for a way to source an
    mx:XML object, without having to load it into ActionScript
    manually. Here’s an example of the functionality I would
    expect:
    <mx:XML id="xmlDP">
    <component data="&gt;" />
    </mx:XML>
    trace(xmlDP.@data);
    // result: >
    Only this does not work for the less than symbol. I’m
    assuming at this point that this is a bug in the Flex compiler.
    Thanks again for your help troubleshooting this one!

  • XML-Tag with own namespace

    Hi all,
    i have a scenario RFC-> XI -> SOAP-XML. But in SOAP-XML i have to use own namespace für each XML-Tag, e.g. <xyz:name>. Should i write a java mapping programe? Is there another way?
    regards,
    Fanglin

    I think you want to define namespace prefix for each tag. Use XMLANONYMIZERBean .  Refer this link and scn for the same discussion. You will see plenty of threads.
    http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

  • Generating xml tags with stored procedure

    Hi Friends,
    I have to create a xml report using procedure .the code is given here to generate xml tags.
    create or replace procedure sri_xml (errbuff out varchar2,
    retcode out number) as
    /* create cursor to fetch the records*/
    cursor c_emp is select empno,
    ename,
    deptno,
    sal,
    job
    from emp;
    begin
    /* first line of xml data should be "<? xml version = "0.1"?>" */
    fnd_file.put_line(fnd_file.output,'<?xml version = "1.0" ?>');
    fnd_file.put_line(fnd_file.output,'<per_emp1>');
    for c in c_emp loop
    /* for each record create a group tag <gemp_name> at start */
    fnd_file.put_line(fnd_file.output,'<G_EMP_NAME>');
    /*EMBEDD DATA BETWEEN XML TAGS */
    fnd_file.put_line(fnd_file.output,'<empno>' || c.empno || '</empno>');
    fnd_file.put_line(fnd_file.output,'<ename>' || c.ename || '</ename>');
    fnd_file.put_line(fnd_file.output,'<sal>' || c.sal || '</sal>');
    fnd_file.put_line(fnd_file.output,'</G_EMP_NAME>');
    end loop;
    fnd_file.put_line(fnd_file.output,'</per_emp1>');
    end;
    i run the procedure in the concurrent program with output mode as text and i got the xml tags as the out put. i have created the template using the data definition and registered them in the xml publisher administer but i am unable to get the out put when i run the concurrent request it is giving the message "AUTHENTICATION FAILED".
    please help me to solve the problem and to get the desired output with desired template.
    thanks in advance,
    siddam

    Hi Siddam,
    Please post your query on BI Publisher forum.
    There are number of folks who can resolve the issue u faced.
    Please go through the bi publisher developers guide and then design the report.
    I am not sure about the process ur following for report development...i think you have to create data defination and rtf layout and then attach it to oracle xml administrator responsibility.
    Ratnesh

  • Unable to define the XML tags with colon in XPath using gluecode

    Hi Everyone,
    I am working on XML with InDesign CS4. I need to do some automation stuffs for those. In my InDesign document, the XML tags (Eg. <ab:para>, <ab:figure> & etc…) name contains colon characters. If i try to loop these tags through gluecode using XPath expression, the script throws me a error like 'Adobe InDesign cannot processXPath expression'.
    Can anyone look into this and suggest me a right solution.
    Thanks in advance.
    Thiyagu

    Hi thiyagu,
        this.xpath = "//para";
        this.xpath = "//figure";
    Try this without the XML namespace in XPath Expression.  it's not tested code,  but it may works.
    Regards,
    Nagaraj

  • XML tag with attributes and one value via XSU

    I need to generate a XML structure with attributes in the opening tag, and just one value in the body, like this:
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">9.99</PRODUCT-LIST-PRICE>
    Without an object type, I can just create tags like this
    XML3
    <PRODUCT-LIST-PRICE>9.99</PRODUCT-LIST-PRICE>
    (with no attributes, but a single value) via the followig statement
    SELECT sys_xmlgen ('9.99',
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML3"
    FROM DUAL;
    Having an object "productlisteprice_type", defined by
    CREATE OR REPLACE TYPE productlisteprice_type AS OBJECT
    "@NET-PRICE" VARCHAR2(10),
    "@CURRENCY" VARCHAR2(10),
    "PRICE" VARCHAR2(20)
    I just get XML like this
    XML2
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">
    <PRICE>9.99</PRICE>
    </PRODUCT-LIST-PRICE>
    (with attributes, but no direct value beneath the "PRODUCT-LIST-PRICE" tag) via the following statement
    SELECT sys_xmlgen ( productlisteprice_type(0,'USD','9.99'),
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML2"
    FROM DUAL;
    Not what I need :-(
    Are there any possibilities in XSU to get the needed XML code? Or do I have to do some post-production via XSQL???
    Another question: Is it possible to use specific keywords like "online" as XML tagnames, via objects? The objects don't allow "online" as a field name...
    Thanks in advance,
    Holger

    I need to generate a XML structure with attributes in the opening tag, and just one value in the body, like this:
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">9.99</PRODUCT-LIST-PRICE>
    Without an object type, I can just create tags like this
    XML3
    <PRODUCT-LIST-PRICE>9.99</PRODUCT-LIST-PRICE>
    (with no attributes, but a single value) via the followig statement
    SELECT sys_xmlgen ('9.99',
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML3"
    FROM DUAL;
    Having an object "productlisteprice_type", defined by
    CREATE OR REPLACE TYPE productlisteprice_type AS OBJECT
    "@NET-PRICE" VARCHAR2(10),
    "@CURRENCY" VARCHAR2(10),
    "PRICE" VARCHAR2(20)
    I just get XML like this
    XML2
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">
    <PRICE>9.99</PRICE>
    </PRODUCT-LIST-PRICE>
    (with attributes, but no direct value beneath the "PRODUCT-LIST-PRICE" tag) via the following statement
    SELECT sys_xmlgen ( productlisteprice_type(0,'USD','9.99'),
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML2"
    FROM DUAL;
    Not what I need :-(
    Are there any possibilities in XSU to get the needed XML code? Or do I have to do some post-production via XSQL???
    Another question: Is it possible to use specific keywords like "online" as XML tagnames, via objects? The objects don't allow "online" as a field name...
    Thanks in advance,
    Holger

  • Output to the printer printing xml tags with actual output

    Hi,
    we are calling fnd_request.submit_request with 'XDOREPPB' and assigning a printer to it.
    the output that is getting printed has both the xml tags and the actual output.
    anyone has any idea what might be the reason.
    Regards,

    Got the solution. These tags are getting generated from standard report and we can use <columnname>[1], <columnname>[2]... etc if there are multiple tags with same tag names.

  • Issue mapping XML tags with element id's

    I know how to map standard XML tags into a template, but how do you handle an XML document formatted like this?
    <?xml version="1.0" encoding="UTF-8" ?>
    - <claims>
    - <claim type="institutional">
    - <loop id="HEADER">
    - <seg id="BHT">
    <ele id="BHT01">0019</ele>
    <ele id="BHT02">00</ele>
    <ele id="BHT03">0000</ele>
    <ele id="BHT04">20090806</ele>
    <ele id="BHT05">104133</ele>
    <ele id="BHT06">CH</ele>
    </seg>
    - <seg id="REF">
    <ele id="REF01">87</ele>
    <ele id="REF02">004010X096A1</ele>
    </seg>
    - <loop id="1000A">
    - <seg id="NM1">
    <ele id="NM101">41</ele>
    <ele id="NM102">2</ele>
    <ele id="NM108">46</ele>
    </seg>
    - <seg id="PER">
    <ele id="PER01">IC</ele>
    </seg>
    </loop>

    its again standard way of mapping.
    use attribute and map it.
    what is the requirement ?
    little more info on how you get this xml, how do you want to make the output to be ? etc..

  • Display xml- tags with NULL - value

    Hello
    is there a way to display a tag while the value is null in this matter :
    select
    xmlforest(AFRAGNR_1, AFRAGNR_2 , AFRAGNR_3 ,AFRAGNR_4 )
    AS XML
    FROM VIEW_ABC WHERE x = v1 and y = v2
    -- result: :AFRAGNR_3 and AFRAGNR_4 is null and not displayed:
    XML
    &lt;AFRAGNR_1&gt;J&lt;/AFRAGNR_1&gt;&lt;AFRAGNR_2&gt;J&lt;/AFRAGNR_2&gt;
    -- by using this, its not the result I want to get,
    select
    xmlelement( "AFRAGNR_1" , AFRAGNR_1 ) AFRAGNR_1
    ,xmlelement( "AFRAGNR_2" , AFRAGNR_2 ) AFRAGNR_2
    ,xmlelement( "AFRAGNR_3" , AFRAGNR_3 ) AFRAGNR_3
    ,xmlelement( "AFRAGNR_4" , AFRAGNR_4 ) AFRAGNR_4
    FROM VIEW_ABC WHERE x = v1 and y = v2
    another way ?
    regards Norbert
    Edited by: astramare on Nov 20, 2008 12:32 PM

    I have the same problem:
    - I need to generate XML in format <element id="1" />
    - I need to pass some null values:
    SELECT XMLElement ( "ShipToAddress"
    , XMLAttributes ( customer_id as "CustomerNo"
    , '' as "Code"
    , substr(name,1,30) as "Name"
    , '' as "Name2"
    , substr(street||' '||house_nr,1,30) as "Address"
    , '' as "Address2"
    , city as "City"
    , last_name ||' '|| first_name as "Contact"
    , phone as "PhoneNo"
    , '' as "CountryCode"
    , fax as "FaxNo"
    , zip_cd||' '||postal_code_extention as "PostCode"
    , '' as "County"
    , email as "EMail"
    , website as "HomePage")) customer
    FROM customers;
    result should be:
    <ShipToAddress CustomerNo="100001004" Code="3" Name="4C
    Cons" Name2="" Address="Metrologielaan" Address2="" City="BRUSSEL" Contact="" PhoneNo="" CountryCode="BE" FaxNo="" PostCode="1130" County="" EMail="" HomePage="" />
    and NOT (this is my result at the moment):
    <ShipToAddress CustomerNo="100001004" Code="3" Name="4C
    Cons" Address="Metrologielaan" City="BRUSSEL" CountryCode="BE" PostCode="1130"></ShipToAddress>;
    Can someone help me with this please?
    Edited by: willeha on Mar 5, 2009 7:18 AM

  • Accssing xml tags with name space

    <XML>
    <A> Text line 1 </A>
    <A> Text line 2 </A>
    <A> Text line 2 </A>
    </XML>
    I need to know how to Create and access the tag values using name space. could you send me the code please ?
    Thanks

    Hi:
    If you want to use namespace in XML file. You have to define a DTD file or Schema file. Those file you created to validate the XML file. So you can also define a namespace in DTD and Schema or not.
    When you define a namespace in DTD or Schema, you can use a prefix in front of tag name.

  • "Developing Smart Web UIs with Ajax, JSF, and ADF Faces" example

    I'm trying to get this example (http://www.oracle.com/technology/pub/articles/cioroianu_jsfajax.html) to work within JDeveloper, during compilation I'm getting an error:
    C:\jptest\view\public_html\msgIndexResp.jsp
    Error(5): tags:property is not a registered tag in that namespace.
    C:\jptest\view\public_html\helloNameResp.jsp
    Error(5): tags:property is not a registered tag in that namespace.
    C:\view\public_html\ajaxCtrl.jsp
    Error(6): tags:response is not a registered tag in that namespace.
    Has anyone attempted at this example and ran into the same problem?
    Thanks
    -Wes

    There is no such document for (1) because we are in the process of delivering design time support for ADF BC integration with ADF Faces, as you mentioned.
    Therefore, you could either continue with ADF UIX, ADFm, ADF BC for the time being, or else try out ADF Faces with session scope Managed Beans. In either case, you'll want to convert this later on, when JDev 10.1.3 completes its support for ADF Faces / ADF BC drag-and-drop integration.
    Kind Regards.

  • Report for editing the word document with xml tags

    Hi all,
    My requirement is to edit the contents of the word document in the presentation server through report programming and save that document  in the presentation server.
    For eg if my word document contains many xml  tags with spaces < EDI_DS40 >, i would like to remove the spaces and i want it to be lyk <EDI_DS40>.Then say if i wanted to make some modification (addition, deletion,replacing with some text) in the text in some nth line of the document how can dis be dione.
    Is there any function module or bapi which serves this purpose.
    Can anyone pls guide me on dis.
    Thanks & Regards,
    Revathi.

    Hi,
    just to let you know I have sorted this.
    http://macintoshhowto.com/leopard/how-to-merge-pdf-files-with-preview-in-leopard .html
    Thanks.

Maybe you are looking for

  • Custom Data

    Is their away to get custom data into an email campaign?

  • I can't download purchased TV shows to my iPad

    Hi, Hope someone can help, this is driving me up the wall... I purchased a TV series in iTunes on my iMac. I'm going away and want to transfer this show to my iPad. I first tried syncing it from the mac to the iPad but its in a different format (m4v

  • Weird Hyperlinks Issue - Position-related?

    I have a PDF I'm trying to create which has 1 email and 1 web URL per page. I select the option in Acrobat to make urls from text. It reports 58 links created; this is correct...2 per page, 29 pages = 59 instances. However, not all of the links work,

  • Sending Message from Topic1 to Topic2 using OSB proxy service

    Hi all, I have created a proxy service which listens to a topic and a business service which writes to a topic. In proxy service, in stage i have used publish action to call the business service. Through Test console if i test and able to write the m

  • Airport Express, cannot do a hard reset

    Hello, my AE doesn't work anymore. I mean, it has a flashing green light but cannot find it through Airport Utility. I tried to do a hard reset, holding the reset button pressed for 5 - 10 - 30 seconds, but nothing happens: the green light keep on fl