Using Non-destructive filter with Nested XML data

Hi,
How do you use Non-destructive filter with Nested XML data?
I am using the non-destructive filter sample with my own xml which is setup to search for the <smc></smcs> in my xml below. But when i test it it only searches the last row of the "smc". How can i make it work so it can search for repeating nodes? or does it have something to with how my xml is setup?
    <ja>
        <url>www.sample.com</url>
        <jrole>Jobrole goes here</jrole>
        <prole>Process role goes here...</prole>
        <role>description...</role>
        <prole>Process role goes here...</prole>
        <role>description....</role>
        <prole>Process role goes here...</prole>
        <role>description...</role>
        <sjc>6K8C</sjc>
        <sjc>6B1B</sjc>
        <sjc>6B1F</sjc>
        <sjc>6B1D</sjc>
        <smc>6C9</smc>
        <smc>675</smc>
        <smc>62R</smc>
        <smc>62P</smc>
        <smc>602</smc>
        <smc>622</smc>
        <smc>642</smc>
        <smc>65F</smc>
        <smc>65J</smc>
        <smc>65L</smc>
        <smc>623</smc>
        <smc>625</smc>
        <smc>624</smc>
        <smc>622</smc>
        <audience>Target audience goes here....</audience>
    </ja>
here is the javascript that runs it.
function FilterData()
    var tf = document.getElementById("filterTF");
    if (!tf.value)
        // If the text field is empty, remove any filter
        // that is set on the data set.
        ds1.filter(null);
        return;
    // Set a filter on the data set that matches any row
    // that begins with the string in the text field.
    var regExpStr = tf.value;
if (!document.getElementById("containsCB").checked)
        regExpStr = "^" + regExpStr;
    var regExp = new RegExp(regExpStr, "i");
    var filterFunc = function(ds, row, rowNumber)
        var str = row["smc"];
        if (str && str.search(regExp) != -1)
        return row;
        return null;
    ds1.filter(filterFunc);
function StartFilterTimer()
    if (StartFilterTimer.timerID)
        clearTimeout(StartFilterTimer.timerID);
    StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
I really need help on this, or are there any other suggestions or samples that might work?
thank you!

I apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
thank you Arnout!

Similar Messages

  • Working With Nested XML Data

    Hello,
    I'm doing my best to create a page in Dreamweaver CS4 utilizing Spry datasets and, I hope, a valid nested XML file. What I want to do is use one XML file that provides the content for my nav div and my content div. It would, in essence, display as an outline. When a user clicks on an item in the nav div the content would be displayed. What I'm guessing would work for the XML file would be this format:
    <content>
      <topic name="Elements">   //--this would serve as the nav element and trigger
        <header>Non-editable</header>   //--this would serve as a header in the content area
        <info>
          <detail id="1">CSS, javascript</detail>   //--this would serve as detail under the headers in the content area.
          <detail id="2">Headers</detail>
          <detail id="3">Footers</detail>
          <detail id="4">Areas within navigation panel</detail>
        </info>
      </topic>
    </content>
    I got the idea from this page in Live Docs: Create a Spry nested data set. Also from a Labs page called Nested XML Data Sample. I've been able to make various parts of the page work but I don't know what is broken. My issues are this:
    I once saw but can no longer find a method for preventing redundant display of data. In this case, the nav elements which are attributes in my XML file.
    The details are showing up in my content area. I must be doing the code for the nesting incorrectly.
    I want to then use the details in the content area to trigger spry tooltips, the content for whih would be genereated from an XML file or HTML frags.
    Here is my latest, ill-fated attempt:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Menu - Content Example</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryNestedXMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryStackedContainers.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var dsContent5 = new Spry.Data.XMLDataSet("navigation/content5.xml", "content/topic", {useCache: false});
    var dsInfo = new Spry.Data.NestedXMLDataSet(dsContent5, "info/detail");
    //-->
    </script>
    </head>
    <body>
    <div id="wrapper">
      <div id="header">
        <h1>CSU Website Clinic</h1>
        <h3>Bill Milhoan, IS&amp;T Technical Trainer</h3>
      </div>
      <div id="content" spry:region="dsInfo">
        <ul spry:repeatchildren="dsInfo">
          <li>{dsContent5::info}</li>
        </ul>
      </div>
      <div class="nav" spry:region="dsContent5">
        <ul spry:repeatchildren="dsContent5" spry:choose="">
          <li spry:when="{dsContent5::ds_CurrentRowID} == {dsContent5::ds_RowID}" spry:setrow="dsContent5" spry:select="select" spry:hover="hover" spry:selected="">{dsContent5::@name}</li>
          <li spry:default="" spry:setrow="dsContent5" spry:select="select" spry:hover="hover">{dsContent5::@name}</li>
        </ul>
      </div>
    </div>
    </body>
    </html>
    Thoughts? My hope is to distill this process so I can teach others how to do it in the hopes that they will find it easier to keep their department/program websites up-to-date.
    Thanks for the help.
    Bill Milhoan
    Cleveland State University

    I apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
    thank you Arnout!

  • Using Multiple Subpaths - question about nested XML data

    Hello.
    I am in the process of getting my head around the nested XML data that is one layer deeper than I know how to handle - ultimately I would like to populate a Spry MenuBar from the static XML file.
    Updates & revisions to the menu would be done by simply uploading a new XML file to the server whenever something needs changed.
    The problem I am having is in regard to more than one subpath.
    I can successfully get the "Menuheading" and the "items" to show but the "subitems" that should attach to the "items" are nowhere to be found. Once this is figured out, I will begin building my menu.
    I'm not getting an XML error when testing in Safari (Mac OS 10.5.8)
    I thing my problem lies here in the head section of the page - obviously somewhere in the subPaths area:
    <script type="text/javascript">var dsItems1 = new Spry.Data.XMLDataSet("MenuXML.xml", "/menu/menuitem", { subPaths: [ "items/item", "subitem" ] });
    and here in the body section at subitem:
    <tr spry:repeat="dsItems1">
    <td>{@id}</td>
                <td>{menuheading}</td>
                <td>{items/item}</td>
                <td>{subitem}</td>
            </tr>
    ==================================================
    The end result I would like rendered in the menu is:
    ==================================================
    Menuheading
    ---- Item (hyperlink)
    ---- Item (hyperlink)
    ---- Item (hyperlink)
    ---- Item
           ------- sub submenu item (hyperlink)
    Menuheading
    ---- Item
           ------- sub submenu item (hyperlink)
           ------- sub submenu item (hyperlink)
           ------- sub submenu item (hyperlink)
    ---- Item (hyperlink)
    ---- Item (hyperlink)
    ---- Item (hyperlink)
    ...and so on.
    I have attached both files in their entirety at the bottom of the post in hopes someone can help.
    ==================================================
    Here is the relevant HTML
    ==================================================
    <head>
    <script language="JavaScript" type="text/javascript" src="includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="includes/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">var dsItems1 = new Spry.Data.XMLDataSet("MenuXML.xml", "/menu/menuitem", { subPaths: [ "items/item", "subitem" ] });</script>
    </head>
    <body>
    <div spry:region="dsItems1">
    <table class="dataTable">
    <tr>
    <th width="62">Menu ID</th>
                <th width="171">Menu Heading</th>
                <th width="257">Menu Items</th>
                <th width="257">Submenu Items</th>
            </tr>
    <tr spry:repeat="dsItems1">
    <td>{@id}</td>
                <td>{menuheading}</td>
                <td>{items/item}</td>
                <td>{subitem}</td>
            </tr>
    </table>
    </div>
    </body>
    ==================================================
    A representative snippet of the XML is shown here:
    ==================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
         <menuitem id="0001" type="Aboutus">
              <menuheading>About Us</menuheading>
                   <items>
                        <item id="0011">Welcome to MHBS</item>
                        <item id="0021">History</item>
                        <item id="0031">Mission</item>
                        <item id="0041">Accreditation</item>
                        <item id="0051">Directions</item>
                        <item id="0061">Calendar</item>
                        <item id="0071">Board of Directors</item>
                                     <subitem id="0111">Meet the Board</subitem>
                        <item id="0081">FAQs</item>
                   </items>
         </menuitem>
         <menuitem id="0002" type="Academics">
              <menuheading>Academics</menuheading>
                   <items>
                        <item id="0012">Meet the Faculty</item>
                        <item id="0022">Elementary</item>
                        <item id="0032">Middle School</item>
                        <item id="0042">High School</item>
                        <item id="0052">Academic Achievements</item>
                                     <subitem id="0251">Test Scores</subitem>
                                     <subitem id="0252">College Acceptance</subitem>
                        <item id="0062">Accelerated Reading</item>
                        <item id="0072">Summer Reading</item>
                        <item id="0082">Guidance and Counseling</item>
                   </items>
         </menuitem>
    ... and on and on ...
    </menu>
    Should I be doing something with the Spry.Data.NestedXMLDataSet instead?
    If so, how do I implement that?
    many thanks in advance

    Yes, you should be using the nested dataset instead.
    Did you read: http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html ?

  • Paging and Non Destructive Filter

    Hi all,
    I am trying to create a list screen for a small application I
    am working on and I've hit a problem.
    Originally my list was to show just 10 results at a time and
    for this I used the code from the "Paging Sample" and managed to
    get this working with next and prev buttons.
    All fine at this stage.
    However, I now need to be able to filter the list based on
    criteria enetered into a text feild by the user and the "Non
    Destructive Filter Sample" provided a good solution.
    I implemented the functions and it sort of works. When the
    list first loads the paging functions filter this full list to the
    10 results I require and pressing the next button shows the next
    10. The non destructive filter also works in that it will filter
    the list based on user input.
    The problem that I have is that if a user keys in a some
    criteria that makes the non destructive fiter show more than 10
    results (say 30 results) they all show and the paging functions are
    no longer used.
    I have tried in vain to apply the paging functions to the non
    destructive filter funtions so that when they return the rows it
    will limit the results to 10 at a time.
    Has anyone else come accross this? Does anyone have any
    advice or sample code that may help.
    Thanks in advance.
    T12

    Hi T12,
    Checkout this sample:
    http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
    It's a preview of a paging approach we're playing with. The
    idea is that you use the paged view data set for displaying the
    data, but you use the original data set to do all your filtering,
    sorting, etc.
    --== Kin ==--

  • Nested XML data set

    Hi there,
    I have a problem with displaying some nested XML data. I've
    tried quite a lot of different approachey to this, but just can't
    get it working properly. So here's the deal:
    I have an XML file (which is dynamically created from a
    servlet) of the form:
    <variations>
    <variation>
    <name>...</name>
    <...>...</...>
    <links>
    <link>
    <type>...</type>
    <name>...</name>
    </link>
    </links>
    </variation>
    </variations>
    On my webpage, I use a Spry tabbed panel with one tab for
    each of the 'variation's in the XML file. Within the tabs I have
    (many) form fields dynamically filled with the values from the XML
    and that all works fine, but I also want to display a table with
    one row corresponding to each 'link'... and that just won't work...
    My latest approach looks something like this:
    <head>
    <script type="text/javascript">
    <!--
    var dsVariations = new
    Spry.Data.XMLDataSet("Servlet?id=1&cmd=getVariations",
    "variations/variation");
    var dsLinks = new
    Spry.Data.XMLDataSet("Servlet?id=0&cmd=getLinks",
    "links/link");
    //-->
    </script>
    </head>
    <body>
    <div id="TabbedPanels1" spry:region="dsVariations">
    <div id="TP1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li spry:repeat="dsVariations" class="TabbedPanelsTab"
    tabindex="0">{dsVariations::name}</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div spry:repeat="dsVariations"
    class="TabbedPanelsContent">
    // a lot of form stuff
    <table border="1">
    <script type="text/javascript">
    dsLinks.setURL("Servlet?id={dsVariations::id}&cmd=getLinks");
    dsLinks.loadData();
    </script>
    <tr spry:repeat="dsLinks">
    <td>{dsLinks::type}</td>
    <td>{dsLinks::name}</td>
    </tr>
    </tr>
    </table>
    </div>
    </div>
    </body>
    In this, the Servlet call with cmd=getVariations returns the
    whole XML stated above, while the cmd=getLinks will only get the
    corresponding part (everything between <links> and
    </links>).
    The error message I get for this is: processTokens() failed
    to get a data set context!.
    I previously tried to use a NestedXMLDataSet, but couldn't
    get that working either... I'm really kind of stuck by now and
    would appreciate any help.
    Thanks,
    Florian
    PS Thanks a lot for creating Spry: It's great!

    Thanks for your reply, Cristian.
    I'm afraid I couldn't do that since it would cause the whole
    region to be reloaded constantly (because it's being updated each
    time I do the setURL / loadData)... in fact, I tried this before
    and it didn't work.
    But, in fact, I figured that the fact that I could not get it
    running using a NestedXMLDataSet (as I would generally prefer), did
    not actually come down to a problem in the page source code, but
    actually to a problem with the very XML itself:
    I tried to recreate the simple nested data set example (
    http://labs.adobe.com/technologies/spry/samples/data_region/NestedDataSample.html)
    and basically used the same code and an almost identical XML
    structure... yet it doesn't work. The contents of dsFeatures just
    won't be displayed and when I'm inspecting the contents of
    dsFeatures (using Firebug) it shows me that the dataset is empty. I
    just don't get why it works for your example, but not for my
    modified version... I can't see any crucial difference :-s.
    To simplify the problem I deleted most tags from the XML and
    saved it in a static document "variations.xml":
    <variations>
    <variation>
    <name>Var 1</name>
    <features>
    <feature>none</feature>
    <feature>feat1</feature>
    <feature>feat2</feature>
    </features>
    </variation>
    <variation>
    <name>Var 2</name>
    <features>
    <feature>none</feature>
    </features>
    </variation>
    </variations>
    The source of the test page would be:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Nested Data Sample</title>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    var dsVariations = new Spry.Data.XMLDataSet("variations.xml",
    "/variations/variation");
    var dsFeatures = new Spry.Data.NestedXMLDataSet(dsVariations,
    "features/feature");
    </script>
    </head>
    <body>
    <table border="1">
    <tr>
    <th width="30%"
    onclick="dsVariations.sort('name');">dsVariations</th>
    <th width="30%"
    onclick="dsFeatures.sort('link')">dsFeatures</th>
    <th width="30%">dsVariations + dsFeatures</th>
    </tr>
    <tr>
    <td valign="top"><div
    spry:region="dsVariations">
    <ul>
    <li spry:repeat="dsVariations" spry:select="select"
    spry:hover="hover" spry:setrow="dsVariations"> {name}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsFeatures">
    <ul>
    <li spry:repeat="dsFeatures"> {dsFeatures::feature}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsVariations
    dsFeatures">
    <ul>
    <li spry:repeat="dsVariations"> {dsVariations::name}
    <ul>
    <li
    spry:repeat="dsFeatures">{dsFeatures::feature}</li>
    </ul>
    </li>
    </ul>
    </div></td>
    </tr>
    </table>
    </body>
    Evidently, I'm missing some essential simple point here...
    Thanks,

  • Little help with complex XML data as data provider for chart and adg

    Hi all,
    I've been trying to think through a problem and Im hoping for
    a little help. Here's the scenario:
    I have complex nested XML data that is wrapped by subsequent
    groupings for efficiency, but I need to determine if each inner
    item belongs in the data collection for view in a data grid and
    charts.
    I've posted an example at the bottom.
    So the goal here is to first be able to select a single
    inspector and then chart out their reports. I can get the data to
    filter from the XMLListCollection using a filter on the first layer
    (ie the name of the inspector) but then can't get a filter to go
    deeper into the structure in order to determine if the individual
    item should be contained inside the collection. In other words, I
    want to filter by inspector, then time and then tag name in order
    to be able to use this data as the basis for individual series
    inside my advanced data grid and column chart.
    I've made it work with creating a new collection and then
    looping through each time there is a change to the original
    collection and updating the new collection, but that just feels so
    bloated and inefficient. The user is going to have some buttons to
    allow them to change their view. I'm wondering if there is a
    cleaner way to approach this? I even tried chaining filter
    functions together, but that didn't work cause the collection is
    reset whenever the .refresh() is called.
    If anyone has experience in efficiently dealing with complex
    XML for charting purposes and tabular display purposes, I would
    greatly appreciate your assistance. I know I can get this to work
    with a bunch of overhead, but I'm seeking something elegant.
    Thank you.

    Hi,
    Please use the code similar to below:
    SELECT * FROM DO_NOT_LOAD INTO TABLE IT_DO_NOT_LOAD.
    SORT IT_DO_NOT_LOAD by WBS_Key.
        IF SOURCE_PACKAGE IS NOT INITIAL.
          IT_SOURCE_PACKAGE[] = SOURCE_PACKAGE[].
    LOOP AT IT_SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
            V_SYTABIX = SY-TABIX.
            READ TABLE IT_DO_NOT_LOAD into WA_DO_NOT_LOAD
            WITH KEY WBS_Key = WA_SOURCE_PACKAGE-WBS_Key
            BINARY SEARCH.
            IF SY-SUBRC = 0.
              IF ( WA_DO_NOT_LOAD-WBS_EXT = 'A' or WA_DO_NOT_LOAD-WBS_EXT = 'B' )     
              DELETE IT_SOURCE_PACKAGE INDEX V_SYTABIX.
            ENDIF.
    ENDIF.
          ENDLOOP.
          SOURCE_PACKAGE[] = IT_SOURCE_PACKAGE[].
        ENDIF.
    -Vikram

  • Correction for Nested XML Data Sample

    I found an error in the sample code on the
    Nested
    XML Data Sample under "Using Nested Data Sets." Line 8 has
    var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
    "toppings");, but it should be
    var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
    "topping"); in order to match the XML file.
    Another suggestion for us newbies would be to have the
    samples start with a comment about any additional scripts we need
    to insert into our files. It took me a long time to realize I
    needed to include
    <script type="text/javascript"
    src="scripts/SpryNestedXMLDataSet.js"></script> with
    the others in the head.
    Thanks for your work!
    Jonathan

    Hi Jonathan,
    Thanks for catching that. I corrected the doc and the change
    will appear when we release 1.5.
    Also, regarding <script> includes sample, yes, we
    should definitely be doing that.
    Thanks!!!
    --== Kin ==--

  • Xml publisher enterprise!!! create rtf file dynamically with load xml data

    i am new to xml publisher enterprise , i want a solution for this question ...
    i want create rtf file dynamically with loading xml data....means i wrote a program in jsp where the the output in xml file simultaneously create rtf file..but i enable load the xml data in rtf file but when i goto rtf file from where data in that load xml then it genrate the columns..but i want in dynamiclly to load the data will you please guide me ......

    Hi Atiq
    Im not quite clear on the requirement here:
    1. Do you just want to be able to extract the data and apply a template to the XML data from your jdp and render output?
    If so then you can use the XMLP APIs ... the are in the user guide. Particularly:
    RTFProcessor - converts RTF template to XSLFO stylesheet
    FOProcessor - takes, XML data, XSLFO stylesheet and output format and generates the required output.
    2. Do you want a template that will accept any data and just format it into rows and columns ? This can be written but your XML structure is going to have to be static, the data of course can be dynamic.
    Regards, Tim

  • Does JCE 1.2.2 make use of a certificate with an expiration date?

    Does JCE 1.2.2 make use of a certificate with an expiration
    date?
    If so, what's the date?

    The validation code which checked for certificate expiration was only found in JCE 1.2.1. It WAS REMOVED from JCE 1.2.2 and all successive releases like JCE in JDK 1.4.x and 5.x (and soon in 6.x). This expiration problem was the primary reason for releasing JCE 1.2.2 over three years ago. Export control regulations changed following the release of JCE 1.2.1, and Sun released 1.2.2 shortly thereafter so that customers wouldn't have this expiration problem.
    This change is documented as the first bullet in the change log for JCE 1.2.2, which is found both in the product distribution itself and on the following JCE product page:
    http://java.sun.com/products/jce/jce122_changes.html
    That said, JCE 1.2.2 is indeed signed with a certificate which is valid until October 2006, HOWEVER the JCE 1.2.2 and JCE in JDK 1.4.x/5.x code no longer checks that expiration date. All it cares about is that the code signature is valid.
    My understanding is that BOTH JDK 1.3.x and JCE 1.2.2 are slated for End-of-Life on March 30th, 2006, and will no longer be supported by Sun. Both should continue to work after that time, but will no longer be supported.
    I hope that helps clear the confusion.

  • Problem creating nested xml data using XSQLServlet

    Hi,
    This is sort of a sql question.
    I'm trying to create a nexted xml data file.
    The data in a rows format can be had using the
    following query...
    SELECT username, portlet_name, count(instance_name) as
    INSTANCE_COUNT
    FROM portlet_user_subscriptions
    GROUP BY username, portlet_name
    to get is back in a hierrachical format, I tried the
    following...
    SELECT distinct(username) as USERNAME,
    CURSOR (
         SELECT portlet_name, count(instance_name) as
    NUM_INSTANCES
         FROM portlet_user_subscriptions T2
         WHERE T2.username=USERNAME
         GROUP BY portlet_name ) AS PORTLETS
    FROM portlet_user_subscriptions T1
    But, that is running the CURSOE for every username in the
    other loop when it should be doing it only for distinct
    usernames.
    What am I doing wrong here...
    cheers,
    Vijay

    How you store the data in the database?
    Basically, you can query the database with XSQL(<xsql:query/>)
    to get the output in XML. Then you can use XSLT to transform it
    to the format you want.
    <?xml-stylesheet type="text/xsl" href="doyouxml.xsl" ?>
    ...

  • Transfer of nested XML data to BW

    Hi there Experts
    I am trying to transfer XML data to BW.  I have done the worked example in the “How to … send XML Data to BW” document and it’s all working fine. 
    The problem with the example is that the data is in a “flat” format without any nested loops.  So for one Vendor 4711 and two materials “gizmo” and “widgets” the data structure essentially looks like this:
    <DATA>
         <item>
              <VENDOR>4711</VENDOR>
              <MATERIAL>gizmo</MATERIAL>
         </item>
         <item>
              <VENDOR>4711</VENDOR>
              <MATERIAL>widget</MATERIAL>
         </item>
    <DATA>
    Now, since we have a fair bit of data, rather than creating one new line (item) for each combination of VENDOR and MATERIAL we want to set up a nested structure in XML that can be read in BW, something along the lines of
    <DATA>
         <item>
              <VENDOR>4711</VENDOR>
                   <MATERIAL>gizmo</MATERIAL>
                   <MATERIAL>widget</MATERIAL>
         </item>
    <DATA>
    Unfortunately, all attempts have failed so far to create such a structure and admittedly I know very little about XML to begin with.  Any ideas?
    Thanks and greetings from Hamburg!
    Christian

    Hi ,
    You mentioned that you have sucessfully configured to load the XML data into BW.
    Even I also tried to configure by refering to the "How to" document, but am not sucessfull. Could you please help me in this regard.
    I configured the .dll files, but still am getting the
    error "Automation server can't create the object".
    Could you send me the step by step procedure..
    The operating system we are using is the Windows XP.
    Even i searched the SDN, couple of them replied, its not sucessfull.
    Thanks in Advance,
    Prathima Suram

  • Problem with multiple XML data sources

    Hi there,
    I have a template (i'm using XML publisher). I need to use 2 different XML data files in the same template, but i couldn't find any way of doing so. Can somebody help me with this issue please? You obviously cannot load 2 XML Data sources in the same template.
    Thanks and Regards,
    Luke

    Is your xml stored some where,
    then
    Create datatemplate and use the xml as datasource.
    You can create it using the following sysntax
    <dataTemplate name="Employee" description="L" version="1.0">
    <dataQuery>
    <xml name="xml_emp" expressionPath=".//ROW">
    <url method="GET" realm="" username="" password="">
    file:///C:/dept_employee.xml</url>
    </xml>
    <xml name="xml_dept" expressionPath=".//ROW">
    <url method="GET" realm="" username="" password="">
    file:///C:/dept.xml</url>
    </xml>
    </dataQuery>
    <dataStructure>
    <group name="EMP" source="empxml">
    <element name="NAME" value="ENAME"/>
    your element here
    </group>     
    <group name="DEPT" source="xm_DEPTl">
    <element name="DNAME" value="DPTNAME"/>
    your element from 2nd xml here
    </group>     
    </dataStructure>
    </dataTemplate>
    Now your two xml source will become single source for the report.

  • Non-destructive mirroring with stroke

    I’m trying to achieve this…
    …but with Appearances, so that I can still edit the graphic later, say if I wanted to do something like this (alt+drag to dupe an item within the group)…
    (desired outcome in outline mode)
    Anyone know how to do this non-destructively, so that I don’t have to recreate the black stroke around the whole thing every time I want to make a change?
    Steps I take to do this now:
    Create the two squares, group them, and create an appearance (fx>transform) to reflect x with one copy (mirroring the object along the left side).
    Expand the appearance.
    Copy all, paste behind, add the paths together, and add the black stroke.
    This gets me what I want to see, but it's a pain in the neck to edit/modify/polish. I want to get the stroke around both objects in the group and still be able to non-destructively (i.e. don't expand appearance) modify the group with updating the stroke and the reflection. Can it be done? Without a script?
    Cheers,
    _Petros

    Fantastic! You guys are the best! I see now that the reason I wasn't able to figure this out on my own is that I was trying to add the stroke my normal way (i.e. setting the stroke color to black from absent in the tool bar) instead of using the appearance panel to add the stroke. If anyone else goes through this, see scott w's note. It won't work right unless you add the stroke from the appearance panel. Kind of obtuse, but I'm super-psyched that it's actually possible. Thanks for the help!

  • CDATA & nested XML data

    I've read the various entries and have ensured the column is
    defined to have HTML content, but in IE7 & Spry 1.6 the content
    provided through the NestedXMLDataSet is not being interpreted as
    HTML, whereas the content from the XMLDataSet is interpreted
    correctly. I reduced the xml data and the page to its most
    simplistic:
    e.g.
    var dsNursery = new
    Spry.Data.XMLDataSet("data/nursery_template.xml", "/events/event");
    var dsItems = new Spry.Data.NestedXMLDataSet(dsNursery,
    "items");
    dsNursery.setColumnType("heading", "html");
    dsItems.setColumnType("content", "html");
    <body>
    <div id="container">
    <div id="sidebar1">
    <ul id="MenuBar1" class="MenuBarVertical"
    spry:region="dsNursery dsItems">
    <li spry:repeat="dsNursery" spry:setrow="dsNursery">
    <a class="MenuBarItemSubmenu" href="#"
    spry:if="{dsItems::ds_RowCount} > 1">{heading}</a>
    <a href="#" spry:if="{dsItems::ds_RowCount} ==
    1">{heading}</a>
    <ul spry:if="{dsItems::ds_RowCount} > 1">
    <li spry:repeat="dsItems" spry:setrow="dsItems"><a
    href="#">{dsItems::item}</a></li>
    </ul>
    </li>
    </ul>
    <!-- end #sidebar1 --></div>
    <div id="mainContent">
    <div id="MenuBar1Detail" spry:detailregion="dsNursery
    dsItems">
    <div id="content">{dsItems::content}
    {heading}</div> <----------------------- "content" is not
    interpreted, but "heading" is.
    </div>
    <!-- end #mainContent --></div>
    <script type="text/javascript">
    Spry.Data.Region.addObserver('MenuBar1',{onPostUpdate:function(){var
    MenuBar1 = new Spry.Widget.MenuBar("MenuBar1");}});
    </script>
    </body>
    </html>
    XML file is:
    <?xml version="1.0" encoding="utf-8"?>
    <events>
    <event>
    <heading><![CDATA[<strong>heading
    1</strong>]]></heading>
    <items>
    <item >item 1</item>
    <content ><![CDATA[<strong>content
    1</strong>]]></content>
    </items>
    </event>
    </events>
    Any assistance is gratefully appreciated.

    Hi fcc770,
    I fixed the setColumnType problem for nested data sets after
    we shipped Spry 1.6. You can find a version with the bug fix here:
    http://labs.adobe.com/technologies/spry/includes/SpryNestedXMLDataSet.js
    The header at the top of the JS file should read version 0.4
    or greater.
    Let me know if that fixes your problem.
    --== Kin ==--

  • Automatically creating non-interactive PDF forms from XML data

    Hi All,
    I am a newbie to the whole Adobe LifeCycle Designer product and have been trying to find a definitive technical article on a way to automatically create pdf documents from template forms using XML data. I can create the XML, I can create the form based on the XML schema but I can't seem to find anything which explains how to automatically associate the form with the each xml file that I create and produce a pdf document based on the xml data.
    The project I am working involves creating marketing brochures, driven from our enterprise databases, to be sent to a printer. No user interaction is required, and I estimate that we'll need to create around 500-1000 pdf's per day.
    To me this seems like it should be quite a simple task but I can't find anything which gives me a starting point.
    Any help would be greatly appreciated.
    Regards
    Nick Smith

    Hi Nick,
    Just curious if you figured out how to generate a PDF out of a template? I've a similar requirement where I transform XML schemas into templates, convert the template into a PDF document, and at run time bind the PDF with the form data.
    To sort of answer your question of how to bind an XML instance file to a form, if that form is an XML-FORM, then all you'd need to do is open that document as a PDF document using the PDFFactory, and invoke the importFormData() method on it, passing the XML instance as the input stream.
    The harder part though is getting the PDF out of the template in the first place, without using any adobe user interface period.
    Karthick

Maybe you are looking for

  • Problem in depreciation report for an old company code

    Hi All Our client has migrated from one company code to another from 1st jan 2009. Now the client wants an asset report for the year ending 31.03.2008 ( fiscal year 2007). The company code is the old one. When I am trying to run the asset report for

  • New To OOPs ABAP

    Hi Friends, I am new to OOps ABAP, can any give me the differences between Procedural ABAP & OOps ABAP ? what is class ? what is Object ? thanks vijaya

  • FCP and powerpoint

    Hi gang, I have finished a movie in FCP and of course it needed a few powerpoint slides. I changed the slides to a 16x9 perspective. I noticed that when I watch the final product on a widescreen tv, my titles are out of the safe zone. Frustrating bec

  • OT: Composing forum messages?

    There seems to be a basic flaw in the way that partly composed messages are displayed, or I'm doing something wrong. I pasted in a paragraph of text I'd prepared earlier. But I was then unable to scroll to the top of it to edit! Also, is there no EDI

  • FCP installation failing

    I recently did an archive and re-install of my OS (Leopard), because an Apple tech told me it would improve the performance of my computer.  But, now FCP 7 won't open.  So, I tried reinstalling it, but the installation fails.  It actually freezes whe