XML Data- Help??

Hi,
I have a probelm like how to get node vale from xml file if xml file contains html data.
I would appreciate your help.
I want retrive the value of node1 as
<html><body><h1>Hello</h1></body></html>
Example:
<static_info>
<node1>
<html><body><h1>Hello</h1></body></html>
</node1>
<node2>
some text
</node2>
</static_info>
Thank,
Ravi

tyr to use a SAX Parser and methods of that.
I give u a small example
=====================================================
public static String getNodeValueByName(Node node, String name) {
// Node value
String value = null;
try {
if (node != null) {
// Get all the child nodes
NodeList children = node.getChildNodes();
// Number of child nodes
int childLen = children.getLength();
// Traverse the child nodes to get the required node
for (int ctr = 0; ctr < childLen; ctr++) {
Node child = children.item(ctr);
// If this node matches the given Node name
if ((child != null) && (child.getNodeName() != null)
&& child.getNodeName().equals(name)) {
// Get the Text node
Node grandChild = child.getFirstChild();
// Get the node value
if (grandChild.getNodeValue() != null) {
value = grandChild.getNodeValue();
break;
} catch (NullPointerException ne) {  // No match found
value = null;
return value;
==========================================
thanks and regards,
Amanpreet
[email protected]

Similar Messages

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • Filtering XML data Help!

    I have a sample xml file:
    <photos id = "images">
           <photo>
             <thumb type="jpg" thumbpath="pics/Thumbs/caddo_5-16-10-10_x.jpg"
       thumbwidth="133"
       thumbheight="200"
          path="pics/fullsize/caddo_5-16-10-10.jpg"
       width="425"
       height="640"
       place="Caddo Lake State Park"
       city="Uncertain, Texas"
       cat="Nature"
       date="May 2010"></thumb>
             <file>caddo 5-16-10-10</file>
       </photo>
    Trying to get only the cat Nature to display. Set up HTML file with one dataset please help!

    See the following samples:
    Filtering with XPath
    Multiple Non-Destructive Filters
    Multiple Non-Destructive Filters Mode
    Non-destructive Filter
    XPath filtering with URL Params

  • How to fetch the xml data in webdynpro java

    Hi all,
    i have an xml data which contains the fields as 1.user type, 2. client, 3.vendor number
    in webdynpro java how i validate or fetch the details of  the user type, when ever user login's in portal i can show some data to user 'A' and invisible to user 'B', based on the xml data.
    help me in doing step by step'
    Thanks&Regards
    charan

    Hi
    Follow the steps .
    This is the XML file .
    <?xml version="1.0"?>
    <company>
         <employee>
              <firstname>Tom</firstname>
              <lastname>Cruise</lastname>
         </employee>
         <employee>
              <firstname>Paul</firstname>
              <lastname>Enderson</lastname>
         </employee>
         <employee>
              <firstname>George</firstname>
              <lastname>Bush</lastname>
         </employee>
    </company>
    Java Code of this to fetch the details.
    public class XMLReader {
    public static void main(String argv[]) {
      try {
      File file = new File("c:\\MyXMLFile.xml");
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(file);
      doc.getDocumentElement().normalize();
      System.out.println("Root element " + doc.getDocumentElement().getNodeName());
      NodeList nodeLst = doc.getElementsByTagName("employee");
      System.out.println("Information of all employees");
      for (int s = 0; s < nodeLst.getLength(); s++) {
        Node fstNode = nodeLst.item(s);
        if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
               Element fstElmnt = (Element) fstNode;
          NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("firstname");
          Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
          NodeList fstNm = fstNmElmnt.getChildNodes();
          System.out.println("First Name : "  + ((Node) fstNm.item(0)).getNodeValue());
          NodeList lstNmElmntLst = fstElmnt.getElementsByTagName("lastname");
          Element lstNmElmnt = (Element) lstNmElmntLst.item(0);
          NodeList lstNm = lstNmElmnt.getChildNodes();
          System.out.println("Last Name : " + ((Node) lstNm.item(0)).getNodeValue());
      } catch (Exception e) {
        e.printStackTrace();
    BR
    Satish Kumar

  • Help needed with sending XML data out of Dashboard design/ Xcelsius

    Hi All,
    I did this a year back and got it right, but now am not able to get it, probably Ive made a small mistake which I have been overlooking.
    I selcted Enable XML send in my XML data connection and dfined the connection name as "Range_1" and Range name also as "Range_1"
    Now I worte this servlet in Java:
    public class PostTestServlet extends HttpServlet{
         protected void doPost(HttpServletRequest request, HttpServletResponse response){
         String param1=request.getParameter("Range_1");
         System.out.println(param1);
         protected void doGet(HttpServletRequest request, HttpServletResponse response){
         System.out.println("Get Called");
         doPost(request,response);
         System.out.println("abcd");
    Deployed it to Apache Tomcat 6.
    Also selected the required usage options in Xcelsius for sending data every 10 seconds.
    Now the servlet gets called, I see it in the console.
    But the request.getParameter("Range_1") is returning null.
    Tried many things, not able to figure it out. Any help?
    Thanks
    Nikhil

    Hi,
    Xcelsius/Dashboards will convert the range of values that you want to send into XML.
    It then will POST the XML when it calls the web page.
    For example, if you had created three ranges to send to your web page:
    A (a single cell)
    B (a single cell)
    C (a row of three cells)
    The data in the POST input stream for the web page will look something like this:
    <data>
      <variable name="A">
        <row>
          <column>10</column>
        </row>
      </variable>
      <variable name="B">
        <row>
          <column>15</column>
        </row>
      </variable>
      <variable name="C">
        <row>
          <column>1</column>
          <column>2</column>
          <column>3</column>
        </row>
      </variable>
    </data>
    I don't have an example for ASP, but I do for a JSP (attached).
    Regards
    Matt

  • XML Data Set with Spry Slides - Please Help

    Hi, I'm trying to combine XML Data Set with sliding tabs.
    I've created two keys responsible for sliding the tabs:
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    Then XML Data Set is used to populate the tabs, but only a
    single tab remains visible, and a "Next/Previous" buttons are used
    to move to the next tab. And this is where the problem arises.
    The problem is that, every time I refreash the gallery or
    load it for the first time, I have to press TWICE the "Next" button
    to move to the next image. After that, its all fine, and slides
    well. It's only the FIRST time when loaded.
    Please help.
    Here's the full code:
    <div id="images_gal" >
    ///////////////////////////////////////// The menu - the
    culprit///////////////////////////////////////////
    <div id="menu_next">
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    </div>
    //////////////////////////////////////// The Sliding Panels
    Gallery ////////////////////////////////////////////////////
    <div id="example2" class="SlidingPanels" tabindex="0" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsSpecials">
    <div spry:repeat="dsSpecials" id="{first}"
    class="SlidingPanelsContent{second}"><div class="top_gal"
    ></div><div class="main_gal"><img
    src="images/Galery/{third}" alt="Digital_Signage" width="600"
    height="304" />
    <p class="screen_gal"><a href="#"
    onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
    top=250, left=250')">CLICK TO VIEW</a></p>
    </div><div
    class="bottom_gal"></div></div>
    </div>
    </div>

    Anyone has any idea why I need a DOUBLE Click to start moving
    the sliding panels?
    I've just completed two tutorials by Don Booth.
    1/Building a Spry Sliding Panels widget
    2/Building a photo album with the Spry framework
    But what I try to COMBINE them - display the photos in
    sliding panels, I also need to DOUBLE click the "next" buton before
    it starts scrolling.
    Why is that Double Click needed? Help Please.
    Here's my code for the combined version:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    a {
    position:relative;
    left:23px;
    top:127px;
    z-index:10000;
    color: #FF0000;
    </style>
    <script type="text/javascript"
    src="photo_album_samples/includes/xpath.js"></script>
    <script type="text/javascript"
    src="photo_album_samples/includes/sprydata.js"></script>
    <script type="text/javascript"
    src="Spry/SprySlidingPanels.js"></script>
    <link type="text/css" rel="stylesheet"
    href="Spry/SprySlidingPanels.css">
    </head>
    <body>
    <div >
    <a href="#" onclick="sp1.showPreviousPanel();">Previous
    Panel</a>
    <a href="#" onclick="sp1.showNextPanel();" >Next
    Panel</a>
    </div>
    <div id="panelwidget" class="SlidingPanels" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsGallery" >
    <div spry:repeat="dsGallery" class="SlidingPanelsContent"
    id="p1"><img
    src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
    </div>
    </div>
    <script type="text/javascript">
    var dsGallery = new
    Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
    </script>
    </body>
    </html>

  • Help in XML data..(solved)

    Hi everyone,
    Could someone please help me to solve this..
    I have some XML data in the database in a clob column..like this..
    XMLDATA 1
    ==========
    <findPatientByNameResponse xmlns="http://service.sdt.tact.company.org">
      <out xmlns="http://service.sdt.tact.company.org">
        <ns1:patient xmlns:ns1="http://model.sdt.tact.company.org">
          <age xmlns="http://model.sdt.tact.company.org">66</age>
          <birthDate xmlns="http://model.sdt.tact.company.org">1949-11-23T00:00:00-07:00</birthDate>
          <empi xmlns="http://model.sdt.tact.company.org">544665</empi>
          <firstName xmlns="http://model.sdt.tact.company.org">A</firstName>
          <isValidPatient xmlns="http://model.sdt.tact.company.org">true</isValidPatient>
          <languageCode xmlns="http://model.sdt.tact.company.org">ENGLISH</languageCode>
          <lastName xmlns="http://model.sdt.tact.company.org">SMITH</lastName>
          <maritalStatusCode xmlns="http://model.sdt.tact.company.org">M</maritalStatusCode>
          <middleName xmlns="http://model.sdt.tact.company.org">MADELINE</middleName>
          <newEmpi xmlns="http://model.sdt.tact.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <newPatient xmlns="http://model.sdt.tact.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <sexCode xmlns="http://model.sdt.tact.company.org">F</sexCode>
        </ns1:patient>
        <ns1:patient xmlns:ns1="http://model.sdt.tact.company.org">
          <age xmlns="http://model.sdt.tact.company.org">47</age>
          <birthDate xmlns="http://model.sdt.tact.company.org">1969-04-15T00:00:00-07:00</birthDate>
          <empi xmlns="http://model.sdt.tact.company.org">540171</empi>
          <firstName xmlns="http://model.sdt.tact.company.org">A</firstName>
          <isValidPatient xmlns="http://model.sdt.tact.company.org">true</isValidPatient>
          <languageCode xmlns="http://model.sdt.tact.company.org">ENGLISH</languageCode>
          <lastName xmlns="http://model.sdt.tact.company.org">SMITH</lastName>
          <maritalStatusCode xmlns="http://model.sdt.tact.company.org">D</maritalStatusCode>
          <middleName xmlns="http://model.sdt.tact.company.org">KELLY</middleName>
          <newEmpi xmlns="http://model.sdt.tact.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <newPatient xmlns="http://model.sdt.tact.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <sexCode xmlns="http://model.sdt.tact.company.org">F</sexCode>
        </ns1:patient>
      </out>
    </findPatientByNameResponse>I have to parse the above XML...The above XML has 2 records..
    i used the following query to parse the above XML
    QUERY 1
    =======
    select extractValue(value(t),'/birthDate/text()') "birthDate"
         , extractValue(value(t),'/empi') "empi"
         , extractValue(value(t),'/firstName') "firstName"
         , extractValue(value(t),'/lastName') "lastName"
         , extractValue(value(t),'/middleName') "middleName"
         , extractValue(value(t),'/sexCode') "sexCode"
    from nw_test c,
          table(xmlsequence(extract(xmltype.createxml(c.clob_data),'//findPatientByNameResponse/out/patient'))) t
    where c.id = 1;     with the above query ...it is not returing any records....
    and just for a TEST i changed the above XML to some thing more clear
    XML DATA 2 (Just for test)
    ==========
    <findPatientByNameResponse>
      <out>
        <patient>
          <age>63</age>
          <birthDate>1949-11-23T00:00:00-07:00</birthDate>
          <empi>5446</empi>
          <firstName>A</firstName>
          <isValidPatient>true</isValidPatient>
          <languageCode>ENGLISH</languageCode>
          <lastName>SMITH</lastName>
          <maritalStatusCode>M</maritalStatusCode>
          <middleName>MADELINE</middleName>
          <newEmpi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <newPatient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <sexCode>F</sexCode>
        </patient>
        <patient>
          <age>47</age>
          <birthDate>1967-04-15T00:00:00-07:00</birthDate>
          <empi>540171</empi>
          <firstName>A</firstName>
          <isValidPatient>true</isValidPatient>
          <languageCode>ENGLISH</languageCode>
          <lastName>SMITH</lastName>
          <maritalStatusCode>D</maritalStatusCode>
          <middleName>KELLY</middleName>
          <newEmpi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <newPatient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          <sexCode>F</sexCode>
        </patient>
      </out>
    </findPatientByNameResponse>
    QUERY 2
    =======
    select extractvalue(value(d),'/patient/age') as age,
        extractvalue(value(d),'/patient/birthDate') as birthddate,
        extractvalue(value(d),'/patient/empi') as empi,
        extractvalue(value(d),'/patient/firstName') as firstName,
        extractvalue(value(d),'/patient/languageCode') as languageCode,
        extractvalue(value(d),'/patient/isValidPatient') as isValidPatient,
        extractvalue(value(d),'/patient/lastName') as lastName,
        extractvalue(value(d),'/patient/middleName') as middleName
        from nw_test x,table(xmlsequence(extract(xmltype.createxml(x.clob_data), '/findPatientByNameResponse/out/patient'))) d where id = 2;with query 2 i am able to get the following output
    Age Birthdate empi firstname languagecode isvalidpatient lastname
    Got 2 records...
    Query 2 is working fine..If the change the original XML data..
    But actually i have to parse XML DATA 1
    Could someone please help me with QRERY 1 to parse XMLDATA1.
    Thanks in advance
    phani

    THose namespaces are really a pain. You should consider to have all "xmlns=" removed that are not really needed.
    SQL> r
      1  with x as (select xmltype('<findPatientByNameResponse xmlns="http://service.adt.tactical.intermountain.org"> '
      2                 ||' <out xmlns="http://service.adt.tactical.intermountain.org">'
      3          ||'    <ns1:patient xmlns:ns1="http://model.adt.tactical.intermountain.org">'
      4          ||'      <age xmlns="http://model.adt.tactical.intermountain.org">66</age>'
      5          ||'      <birthDate xmlns="http://model.adt.tactical.intermountain.org">1949-11-23T00:00:00-07:00</birthDate>'
      6          ||'      <empi xmlns="http://model.adt.tactical.intermountain.org">544665</empi>'
      7          ||'      <firstName xmlns="http://model.adt.tactical.intermountain.org">A</firstName>'
      8          ||'      <isValidPatient xmlns="http://model.adt.tactical.intermountain.org">true</isValidPatient>'
      9          ||'      <languageCode xmlns="http://model.adt.tactical.intermountain.org">ENGLISH</languageCode>'
    10          ||'      <lastName xmlns="http://model.adt.tactical.intermountain.org">SMITH</lastName>'
    11          ||'      <maritalStatusCode xmlns="http://model.adt.tactical.intermountain.org">M</maritalStatusCode>'
    12          ||'      <middleName xmlns="http://model.adt.tactical.intermountain.org">MADELINE</middleName>'
    13          ||'      <newEmpi xmlns="http://model.adt.tactical.intermountain.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>'
    14          ||'      <newPatient xmlns="http://model.adt.tactical.intermountain.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>'
    15          ||'      <sexCode xmlns="http://model.adt.tactical.intermountain.org">F</sexCode>'
    16          ||'    </ns1:patient>'
    17          ||'    <ns1:patient xmlns:ns1="http://model.adt.tactical.intermountain.org">'
    18          ||'      <age xmlns="http://model.adt.tactical.intermountain.org">47</age>'
    19          ||'      <birthDate xmlns="http://model.adt.tactical.intermountain.org">1969-04-15T00:00:00-07:00</birthDate>'
    20          ||'      <empi xmlns="http://model.adt.tactical.intermountain.org">540171</empi>'
    21          ||'      <firstName xmlns="http://model.adt.tactical.intermountain.org">A</firstName>'
    22          ||'      <isValidPatient xmlns="http://model.adt.tactical.intermountain.org">true</isValidPatient>'
    23          ||'      <languageCode xmlns="http://model.adt.tactical.intermountain.org">ENGLISH</languageCode>'
    24          ||'      <lastName xmlns="http://model.adt.tactical.intermountain.org">SMITH</lastName>'
    25          ||'      <maritalStatusCode xmlns="http://model.adt.tactical.intermountain.org">D</maritalStatusCode>'
    26          ||'      <middleName xmlns="http://model.adt.tactical.intermountain.org">KELLY</middleName>'
    27          ||'      <newEmpi xmlns="http://model.adt.tactical.intermountain.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>'
    28          ||'      <newPatient xmlns="http://model.adt.tactical.intermountain.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>'
    29          ||'      <sexCode xmlns="http://model.adt.tactical.intermountain.org">F</sexCode>'
    30          ||'    </ns1:patient>'
    31          ||'  </out></findPatientByNameResponse>') myXmlCol
    32          from dual)
    33  select --t.column_value.getClobval(),
    34      extractValue(t.column_value,'//birthDate','xmlns="http://model.adt.tactical.intermountain.org"') "birthDate"
    35  from x x1,
    36*   table(xmlsequence(extract(x1.myXmlcol,'/findPatientByNameResponse/out/ns1:patient','xmlns="http://service.adt.tactical.intermountain.org" xmlns:ns1="http://model.adt.tactical.intermountain.org"'))) t
    birthDate
    1949-11-23T00:00:00-07:00
    1969-04-15T00:00:00-07:00
    SQL> Message was edited by: copy&pasted removed some important code. Added this manually.
    Sven W.

  • Spry XML Data won't diplay - Help

    Here is my code:
    <!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>Untitled Document</title>
    <style type="text/css">
    <!--
    #apDiv1 {
    position:absolute;
    left:8px;
    top:27px;
    width:266px;
    height:115px;
    z-index:1;
    -->
    </style>
    <script language="JavaScript" src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsEvent = new Spry.Data.XMLDataSet("events.xml",
    "events/event");
    //-->
    </script>
    </head>
    <body>
    <div id="apDiv1">
    <div spry:region="dsEvent">
    <table width="278" >
    <tr>
    <th>Name</th>
    <th spry:sort="location">Location</th>
    </tr>
    <tr spry:repeat="dsEvent" spry:setrow="dsEvent">
    <td>{name}{date}</td>
    <td>{location}</td>
    </tr>
    </table>
    </div>
    </div>
    </body>
    </html>
    Here is my problem:
    If I use UNC path it display the data.
    If I use IIS --- such as http:\\testServer\devhome\test.cfm
    it will give me a blank white page. No xml data.
    Can any one point me out what I am doing wrong?
    Thanks in advance.

    Here is my new finding : After I changed ".cfm" to ".html"
    --- it work's !!!!!!!!!!
    My new question is why it is not working in coldfusion. I
    tried in two diffrent server --- same result.
    Need some help here.
    Thanks in Advance.

  • XML Data Server and model help

    All,
    I have the following files
    1) travel.dtd
    2) travel.xml.
    I've set up a XML data server with JDBC driver com.sunopsis.jdbc.driver.xml.SnpsXmlDriver and URL = jdbc:snps:xml?d=c:/XML/travel.dtd. I have created a model in designer and have successfully reversed the datastores generated from the dtd.
    The travel.xml file has data populated within it, but when I right click on the datastores, there is nothing displayed. This makes sense because the xml server is configured to point at the .dtd. Do I need to change my topology connection to connect to the xml document as opposed to the dtd. Can someone tell me what i'm missing?
    thanks for your help.

    Since its not displaying anything as you are saying you just change the property to "f" and check.
    Example
    jdbc:snps:xml?f=/xml/myxml.xml&d=/xml/myxcd.xsd&s=MYSCHEMANAME
    ("s=MYSCHEMANAME": This schema will be selected when creating the physical schema under the XML data server.)
    Hope it helps.
    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

  • Help Secure your XML data - Solution-ish

    Note: Possibly posting this in the wrong forum, Mods feel free to remove or correct.
    This should add a small amount of deterance to someone stealing your data by
    bypassing your flash .swf and just grabbing your xml file to parse themselves.
    File name and variable names of course can be changed, simply keeping
    with the example I'll keep them all what they should be for this
    example to actually work.
    ** Description: This will let your change your secretValue for your
    secretVariable on your flash program and not give you any downtime
    when you upload your flash file with the new secretValue.
    Just remember to change the values stored in your php file after
    you uplaod your flash doc with the new secretValue. As people can
    see the value you send to get your xml file it's not safe for long, if you
    use this idea you'll have to keep up with changing your secretValue to
    make it less desirable for pirates to get your info. In essance this solution
    is designed to bring the end users of the data into the fold helping you decide
    which ip's to potentially block or whatever action you see fit.
    $current_check_value - should always be what your password for the live
    flash doc is.
    $when_updateFlash_check_value - should always be what your next password
    will be next time you upload your flash doc.
    Hope you like it.
    By: Chuck Mongillo
    // PHP File: The XML responder - sends out the xml data
    <?PHP
    File Name: MyXMLfile.php and it would be held in
    Path: http://www.MyServer.com/MyPath/
    // If your server requires you to specify your incoming variables
    // Uncomment this next line.
    // $secretVar = $_GET['secretVar'];
    // Tell your PHP file which passwords it will accept for right now
    // and the password it will accept after you update your flash .swf
    // so there is no downtime for your real project. Downside - your
    // always allowing 2 possible ways in, ie: 2 passwords.
    $current_check_value = "PiratesAreBad";
    $when_updateFlash_check_value = "AreUaPirate";
    if(($current_check_value != $secretVar)&&($when_updateFlash_check_value != $secretVar)){
         // My current .swf secretValue and my updated .swf secretValue failed
         // Give the pirate a slap
         echo("
         <?xml version=\"1.0\" encoding=\"utf-8\"?>
         <myRoot>
              <myXMLValues>
                   <happyData>This data was stolen from MyServer.Com</happyData>
                   <happyData>Please report it. Bad Pirate No Donut!!</happyData>
              </myXMLValues>
         </myRoot>
         // Stop further execution of this file
         exit;
    } // End bad password check
    else{
         // Yay, its (seems to be) my .swf calling the program
         // Give the proper data
         echo("
         <?xml version=\"1.0\" encoding=\"utf-8\"?>
         <myRoot>
              <myXMLValues>
                   <happyData>Tomorrows Winning Lotto Number is:</happyData>
                   <happyData>1 - 2 - 3 - 4 - 5 - 6</happyData>
              </myXMLValues>
         </myRoot>
    } // End good passsword check
    ?>
    // Flash AS3 code: The data request
    // In your flash document you should have something like this to pull your xml file:
    // Set a string to hold your xml path and secret value to check against
    secretValue:String = "PiratesAreBad";
    myXMLurl:String = "http://www.MyServer.com/MyPath/MyXMLfile.php?secretVar=" + secretValue;
    // Set xml and loader variables
    var MyXMLloader:URLLoader = new URLLoader();
    var MyXMLData:XML;
    // Get your XML
    MyXMLloader.load(new URLRequest(myXMLurl));
    MyXMLloader.addEventListener(Event.COMPLETE, gotMyXMLData);
    function gotMyXMLData(e:Event):void
         MyXMLData = new XML(e.target.data);
         MyXMLloader.removeEventListener(Event.COMPLETE, gotMyXMLData);
         // Still not sure why removing a listener requires a call to a function.
         // Expecially why people use it in the same funciton it sits in.
         // But, now you have your xml data.
         If you have other ideas or want to expand on this one feel free, thanks.

    {forum:id=34} is the correct forum to this, and as I see you have already double-posted to there, I suggest that you close this thread.

  • Help required in building up the Java Bean for an XML data

    Hi ,
    I want to build a Java bean which will actually represent an xml data . The class will be named as User and it will typically represent the data in the follwing xml:
    <user>
    <cwsId>barbete</cwsId>
    <firstName>William</firstName>
    <lastName>Barber</lastName>
    <status>true</status>
    <role>
    <roleCode>1000000177</roleCode>
    <roleName>Customer Administrator</roleName>
    </role>
    <language>en</language>
    <country>US</country>
    <preferences>
    <equipmentGroup>2717</equipmentGroup>
    <dateFormat>MON-dd-yyyy</dateFormat>
    <timeFormat>HH:MI AM</timeFormat>
    <timeZone>-12:00</timeZone>
    <daylightSavings>Y</daylightSavings>
    <location>NC</location>
    <recordsPerPage>10</recordsPerPage>
    <historyPeriod>3</historyPeriod>
    <distanceUnit>MILE</distanceUnit>
    <fuelUnit>G</fuelUnit>
    <unitIdDisplay>E</unitIdDisplay>
    <smuUpdate>W</smuUpdate>
    <countries>
    <country>
    <countryCode>GB</countryCode>
    <countryName>UNITED KINGDOM</countryName>
    </country>
    <country>
    <countryCode>US</countryCode>
    <countryName>UNITED STATES</countryName>
    </country></countries>
    </preferences>
    </user>
    Now for single child nodes like cwsId of the main user node i have kept properties like
    private String cwsId;
    But i am not sure as to how to represent the nodes which contain subnodes like "preferences"node. Any ideas?What is the standard practice?

    One thing you could do is create an object model first, which will contain all the data for your user.
    then all you need in the bean is a Hashtable with the name of the user as a key, and the user-object (which is actually the complete object model) as a value.
    with the XML stated by you, you would get an object model something like this:
    Class User
        String cwsid;
        String firstName;
        ArrayList<Role> roles = new ArrayList<Role>(); //I'm assuming a user can have more then one role.
        ArrayList<Country> countries = new ArrayList<Country>();
    class Role {
        String code;
        String name;
    class Country {
        String code;
        String name;
    }And so on for all the varioous elemets of your XML.

  • Please help. Text fields launch email for XML data

    Let me start by saying I have only been using LiveCycle for two days. I did buy a book and have exhaustuvley searched for a solution....with that said....
    After completing almost the entire form, somehow or other I managed to make all the text fields but one initiate email of xml data as soon as you try to type in them in PDF preview or reader or pro.
    I added a new text field for test and it does NOT do the same thing. I can't for the life of me figure out how to turn this off.
    Issue:
    When checking pdf preview, if I click inside a text field to type, it stops the preview and launches an email window with a blank XML file. It does the same thing if I open the file in Reader or Pro.
    Solution I am looking for:
    My form is nearly complete and i would hate to have to start all over. Basically, I do NOT want the text fields to initiate an email of the form data. I just want the user to be able to type in them as required. In my opinion this should only happen with the "email form" button.
    Thanks,
    Joe
    [email protected]

    funny, i found a workaround. after nearly 3 hours and finally posting here, in 15 minutes i found something. I still would like to know
    what caused this if anyone knows.....
    Fix:
    By selecting the text field and changing object type to "Text" then changing it back to "TextField" then save, it now works fine. Of course I had to do it on all 25 fields but way better than redoing all the custom fields i created.

  • HELP RETRIVEING XML DATA

    Hello,
    i have a field which stores IP and Domain data in XML format. The field data type is BLOB.
    here is the XML data sample stored in the field.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <DOMAIN Name="DOMAIN_NAME HERE">
    <IPADDRESS Address="X.X.X.X1"></IPADDRESS>
    <IPADDRESS Address="X.X.X.X2"></IPADDRESS>
    <IPADDRESS Address="X.X.X.X3"></IPADDRESS>
    <IPADDRESS Address="X.X.X.X4"></IPADDRESS>
    ... ETC
    Is it possible to run SELECT against this field and retrieve the data in the table format, so the output will have two fields and look like
    domain IPADDRESS
    DOMAIN_NAME HERE X.X.X.X1
    DOMAIN_NAME HERE X.X.X.X2
    DOMAIN_NAME HERE X.X.X.X3
    DOMAIN_NAME HERE X.X.X.X4
    I have tried many option with Extract, extractvalue and XMLQuery, not luck.
    Thank you very much!
    Sergei

    Use the extractValue() function to extract the node values.
    Refer example 4-3.
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb04cre.htm#1024805

  • Helped, how to load xml data into database

    Hi,
    Given a DTD, can the XML SQL Utility generate
    the database schema?
    I currently have the dtd file to define
    the data type and xml data and I am looking
    for ways of how the XML/DTD can be loaded
    into the oracle db.
    Any suggestions/recommendations are
    appreciated.
    Thanks,
    Judy
    null

    You could check out this web site:
    http://www.rpbourret.com/xml/XMLAndDatabases.htm#software
    where you can find a list of products that can translate a DTD to a relational schema. Also, there are several technical papers that discuss algorithms to carry out this translation. FYI, We have implemented a similar system,and testing it out.
    null

Maybe you are looking for

  • How to execute DOS command in Java?

    I want to execute a dos command in Java,such as execute test.bat command? How to realize it? Thanks in advance!

  • Decimal place support in BOM for R11i

    Hi, does anyone can enable higher precision upto 9 decimal place in BOM, existing only 6 decimal place support in component quantity but ct would need more. Does R11i (11.5.4) support more than 6 decimal place in BOM? if it can, how to setup. Thanks

  • Executing and pop up for exe to down load

    HI, i had a hyper link in my jsp page and when i click that link , it should check for wether an exe is installed in my sytem or not, if that one is installed in my system , it has to start executing. If at all that exe is not present, then a window

  • Connection to Excel using JDBC

    Hi I developed a program to send userid to excel sheet using jdbc... While i opened excel sheet and try to send data through jdbc it works great ... But the problem is while i closed the excel sheet and try to send data to excel sheet, it spells succ

  • Session management, No Log Found

    Hi, Is it possible for a user to view his log? Now he will get the message 'No Log Found' when he opens the 'View Log' via Session managment. Thnx, Robbert