Building a subset XML

Hi,
I have data in XML structure is a CLOB colum in a table. Now I want to access data from that XML structure in the CLOB and bring out the desired data as an XML structure which will be a subset of the XML structure in the CLOB.
Is there a way of building and XML subset from a XML in the table in a PLSQL block.
E.G.
/********INPUT**********/
XML in the CLOB--
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<EMPNO>12</EMPNO>
<DEPTNAME>Finance</DEPTNAME>
<PERSON>
<NAME>Mark</NAME>
<CONTACT>
<PHONE>12-3456</PHONE>
</CONTACT>
</PERSON>
</ROW>
<ROW num="2">
<EMPNO>10</EMPNO>
<DEPTNAME>HRD</DEPTNAME>
<PERSON>
<NAME>Twain</NAME>
<CONTACT>
<PHONE>029-964</PHONE>
</CONTACT>
</PERSON>
</ROW>
</ROWSET>
/****************OUTPUT***********/
desired data as XML subset.
<PERSON>
<NAME>Twain</NAME>
<CONTACT>
<PHONE>029-964</PHONE>
</CONTACT>
</PERSON>
Regards,
Milton C.

If you want to transform an XML into another XML, based on certain rules that you can specify in advance, then XSLT is one way to do that. But you already seem to know that -- so why the question?

Similar Messages

  • IS IT POSSIBLE 2 BUILD A NEW XML FROM DAMAGED ITL? SAVE FERRIS

    OK. Here's my situation. I have an HP notebook running on VISTA. ITUNES version 8.1.1....... My computer shut off abruptly while I was running ITUNES and after I restarted it and started up Itunes, I got the damaged ITL message. No big deal, I still have all my songs in their designated folder and I'll just import the XML to get all my playlists back in action. I've done this at least 10 times already. Works like a charm everytime. Oh S#!T,... my XML was wiped out during the shut down. I have a program that can retrieve files after recycle bin deletion and the XML is no where to be found. SOOOOOO here's my questiion. When my computer S#!Ted in my cereal, it split my ITL into two seperate damged ITL's. One 32 MB and the other 14 MB. I know the XML is just a backup of the ITL and I frequently update my XML twice a week to make sure no B.S. could bestow it's bad self all up in my shizz. I just never figured to make a copy of the XML because everytime this has happened, the good XML was always there to use. (NOW I KNOW)Soooo, I need to know how to build an new XML from the two damaged itl's. That way I can just import the two new xml's and then save, thus making itunes create a new fresh XML from my two provided and restoring my itunes to it's original self. My problem is I can't get ITUNES to read my two damaged ITL's. Yes, I've done the name change method, no love. I tried the restart computer at a previous date and time method, didn't work. I tried the previous libraries folder and it's five moths old, which is a 10,000 song difference for me. So that way is useless. I even downloaded the same version of ITUNES that I run onto my home computer, which runs on XP, so I could try the system cache method. No love there either. I've stumbled upon a page where a person stated that they were able to manually poke around with their ITL file and forcing ITUNES to repair it. However this person was a computer whiz and I am sooooo totally not. So I had no idea what he was talking about. Anyone dealt with this scenario before? I tried praying to GOD but all he said was "THAT'S WHAT YOU GET FOR PUTTING SHANIA TWAIN'S ..THAT DON'T IMPRESS ME MUCH.. ON YOUR IPOD YOU F%#KING DORK!!!" and I was like, "dude, it is undeniably impossible to not have a smile on your face for the duration of that righteous classic. Then he just f@rted into his hand and released it an inch away from my nostrils, followed by some bird flippage and nut sack grab. So I'm gonna need some help with this one. Thanks Ahead

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    How to Transfer App Data and Game Saves from One iOS Device to Another
    http://lifehacker.com/5891964/can-i-transfer-app-data-and-game-saves-from-my-iph one-to-a-new-ipad
    How to transfer data from your old iPad to your new iPad
    http://www.imore.com/how-transfer-data-your-old-ipad-your-new-ipad-air-or-retina -ipad-mini
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • Building charts from xml

    I'm trying to build a series of charts from xml (sample below). Examples might be a column chart of all scores, or a column chart of all 'fred' values. All the examples I've seen are ArrayCollections, or if they are XML, they are very simple xml. I've tried converting the xml to an ArrayCollection (didn't work) and I've tried using the xml as the datasource. I could loop through and build a simple xml for each chart but there must be an easier way. Any suggestions.
    <results>
                    <item name="group1" speed="100" score="23" time="123">
                        <detail>
                            <element name='fred'>2</element>
                            <element name='john'>3</element>
                        </detail>
                    </item>
                    <item name="group2" speed="10" score="3" time="1">
                         <detail>
                             <element name='fred'>12</element>
                             <element name='john'>31</element>
                         </detail>
                     </item>
                    <item name="group3" speed="230" score="53" time="78">
                         <detail>
                             <element name='fred'>42</element>
                             <element name='john'>81</element>
                         </detail>
                     </item>
    </results> 

    Charting framework access the fields like this item[yField] so any of the y field values that you have given does not work i.e. item["item.detail[0]"] etc. do not work.
    For this purpose we created a property called dataFunction on Series, CategoryAxis classes through which you can provide appropriate value for your fields.
    From the livedocs - http://livedocs.adobe.com/flex/3/langref/mx/charts/chartClasses/Series.html#dataFunction
    You typically use the dataFunction property to access fields in a data provider that are not scalar values, but are instead nested in the data provider. For example, the following data requires a data function to access the fields for a chart's data provider:
          , open:25.19}
    The following example returns a value from this data provider:
         public function myDataFunction(series:Series, item:Object, fieldName:String):Object {
              if(fieldName == 'yValue')
                  return(item.close.High);
              else if(fieldName == "xValue")
                  return(item.month);
              else
                  return null;
    Thanks
    -Sunil

  • Order of Installation of Flex Builder, SVG Viewer, XML Parser

    Hello VC Experts,
    I am beginner. I need to create Reports in VC using BW Queries. I am Facing Flex application error while deploying the model. Is there any specific order of Installation of Flex Builder, SVG Viewer, XML Parser?
    Kindly help me to *** up this pblm.
    Regards,
    Geeta

    Hi Geeta,
    please do not open twice threads for the same issue.
    I close your first thread here:
    Error in compiling Flex application (1). Consult log file for details.
    But first enable the flex error log in VC, then you can post us the error message.
    Best Regards,
    Marcel

  • Mappings in EDIFECS Builder to OAG XML

    Hi
    We are implementing EDI transactions like 850, 810 etc., Inbound transactions with out trading partners.
    We are planning to use following different tools.
    I)
    Oracle 11g B2B - > Oracle 11g BPEL -> XML Gateway -> eBusiness Suite
    We would like to know is there any way we can use following tools
    II)
    Oracle 11g B2B -> XML Gateway -> eBusiness Suite
    We have following questions
    1) Which path is the prefered way of exchanging the EDI documents in 11g Environment.
    2) If Step II is the correct way, is B2B capable of converting EDI raw data to directly OAG XML?
    If Yes, Could you please point us correct documentation.
    3) If Step II is correct, using EDIFECS builder how can we do predefined mapping and submit to SOA 11g B2B so that B2B can convert the EDI data to OAG XML.
    4) Is there any tutorials available?
    -Ravi

    Hi Ravi,
    1) Which path is the prefered way of exchanging the EDI documents in 11g Environment.First option (Oracle 11g B2B - > Oracle 11g BPEL -> XML Gateway -> eBusiness Suite) is the suitable way.
    2) If Step II is the correct way, is B2B capable of converting EDI raw data to directly OAG XML?No. B2B can not convert the EDI raw data to directly OAG. You have to use Java callout for explicitly converting EDI XML (preapred by B2B automatically from raw EDI) to OAG.
    4) Is there any tutorials available?For handling callouts in 11g, please refer -
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10229/callouts.htm#CIHJBGHG
    EDI Tutorial for 11g is available at -
    http://www.oracle.com/technology/products/soa/b2b/collateral/B2B_TU001_EDI.pdf
    Regards,
    Anuj

  • Can Document Builder parse an XML file from a URL?

    Warning: Java newbie here...
    My problem is that I am able to parse an XML file if it is copied into my project, but not if it is a full URL. Here is what I got so far, that works.
    import java.io.*;
    import java.net.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    try {
        File file = new File("path/to/file.xml");
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        DocumentBuilder db = dbf.newDocumentBuilder();
        Document doc = db.parse(file);
        doc.getDocumentElement().normalize();
        NodeList nodeLst = doc.getElementsByTagName("Names");
        for (int s = 0; s < nodeLst.getLength(); s++) {
            Node parentNode = nodeLst.item(s);
            if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
                Element parentElmnt = (Element) parentNode;
                NodeList nameElmntLst = parentElmnt.getElementsByTagName("Name");
                //etc.
    } catch (Exception e){
        e.printStackTrace();
    }So building off of this I have tried to parse an input stream like this:
    URL url = new URL("http://example.com/file.xml");
    InputStream is = url.getInputStream();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(is);which gives me the following error
    [Fatal Error] :-1:-1: Premature end of file.
    LOG: HME receiver connected
    org.xml.sax.SAXParseException: Premature end of file.
    I also even tried to write the file locally like this:
    URL url = new URL("http://example.com/file.xml");
    HttpURLConnection urlcon = (HttpURLConnection) url.openConnection();
    urlcon.connect();
    InputStream is = urlcon.getInputStream();
    File file = new File("path/to/file.xml");
    OutputStream out = new FileOutputStream(file);
    byte buf[] = new byte[1024];
    int len;
    while((len=is.read(buf))>0)
        out.write(buf,0,len);
    out.close();
    is.close();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(file);This gives the same error.
    If anyone can point me in the right direction I would forever thankful. I've tried search Google and the Sun forums, but haven't quite found the solution. I think it is because I need to try something else completely. Thank you for reading.
    ~~~~ Jeremy

    jmose wrote:
    If I copy the page, it works as shown in the first code block. In the third codeblock the file is never even created, so I cannot tell if that works or not.So: having the parser access the URL fails, and having some other Java code access the URL also fails in the identical way? That suggests the problem is simply accessing the URL via Java code. Presumably when you downloaded the data from the URL, you used a browser to do it and not wget or something like that?

  • Build Reports from XML output from Reports

    Hi,
    I was just wondering if it is possible to build reports from output in XML format, originally generated by Oracle Reports.
    The XML output produced by Reports is stored in a database for further processing.
    TIA
    Hien

    Hi Hien
    If I have understood this right, you need to create report in XML format from an XML Report Definition File. From the Builder, Generate to File from the File menu and choose XML format for the output.
    Remember that XML output from Reports is Data driven and faithfully reproduces the Data Model. It is NOT layout driven.
    Regards
    Sripathy

  • Export release build not including XML data files in apk package

    Hi, all;
    I have a flash pro project that I have packaged for AIR based on these steps:
    http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professiona l-projects/
    There are two differences:
    I am loading XML files from right next to the swf
    The Flash Pro project and the Mobile project are sharing a directory that is outside of both projects (this was the workflow already established in FP, since multiple swfs share the same XML).
    When I test this on my phone, it adds the XML files to the apk and everything works great. The problem I am having is that the Export Release Build does not have the XML files included, and I don't see anything in the Flash Builder interface that looks like it will allow me to add other files than the swf and the app.xml.
    What am I missing?

    Thank you so much--your feedback enabled me to think through this and get to the critical piece I was missing. I've marked it helpful, because it pointed the way.
    I'm not a big fan of marking one's own answers "correct," but I'm going to do that this time so that people can easily find the steps.
    The mistake I was making was thinking that the "Debug on device" was not going to push out a debug AIR version, because the swf was not a debug swf.
    I didn't understand that if I clicked the Run button, that this would also push a version out to the device, and that this version would not give the "waiting to connect to the debugger" message.
    The whole process you get when you click "Run" is a little odd (I say this for those who have never tried it). It will install the app to the device, but doesn't launch it (I think it can't). Flash Builder then hangs in "Installing application to device." If you actually look at the screen, you will see a new download in your notifications bar, and from there you can launch the app.
    To summarize:
    To get started packaging your Flash Pro swf for Air using Flash Builder, follow Renaun's steps (http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professiona l-projects/)
    In the process of getting this working on Mobile, you probably have a debug version installed on your phone. Uninstall this using Astro File Manager (https://play.google.com/store/apps/details?id=com.metago.astro&hl=en)
    Instead of clicking the "Debug" button in Flash Builder, click "Run." This makes a non-debug apk and pushes it to your phone (if your configuration allows for debugging on the device).
    Additional notes: if you have xml files that are packaged into the apk file and you're using URLLoader (because the app originates as a web app), add "app:/" to the beginning of the URL string you are using. So "xml/myFile.xml" becomes "app:/xml/myFile.xml". If you need to keep your original web app logic, add a conditional on Capabilities.playerType=="Desktop."
    Hope this helps someone else with the same problems

  • Automaticaly building pages from XML input?

    Hello, folks
    First: I am not sure if this is the right forum to ask this question, if so bear with me, please.
    We want to make an iPad application with a very tight deadline. For that we would need to process real fast about 70-90 pieces of news in InDesign with the less human intervention as possible (desired aim:none).
    Each piece of news would have 1-3 pages of content with one or two pictures. We have build a set of templates with master pages for all of them (About 6-7 very simple variants).
    We would like to define a workflow that would satisfy our needs and I believe something as I will describe next would serve them. What I would like from you, please, is telling me if that would be feasible, and if it is a good approach and, if so, what would we need to accomplish it:
    We can place our content formatted as XML into a folder or set of folders.
    This folders would act as hot folders, detected by InDesign (InDesign Server? Enfocus Switch?)
    The software (ID server?) detects the presence of new content and then places the XML into the InDesing template assigned to that folder.
    As we would have used XML-tagged frames in the templates (using InCopy or the content collector), the template would include vertical and horizontal versions (alternative layouts). So, InDesign would be doing automatically what a human would do by hand: Pick template, insert XML, save as ID document.
    The software (enfocus switch? InDesign server?) would then place each appropriated final InDesign document in an oputput folder.
    If we could manage to achieve the assignation of an article AND its upload and inclusion into an Adobe DPS folio in our account that would be SWEEEEEEET... But maybe that would be asking too much.
    The human intervention would be then limited just to sieve the unwanted pieces of news and tweak minor things here and there.
    So the question is: How does it sound? Whacky? Feasible? Way too expensive/complex? Any better/simpler idea?
    Thank you
    Gustavo (Posting from Madrid)

    Hi Gustavo,
    maybe you already got help on this question. Production of iPad publications for several languages and/or formats can be challenging, I totally agree. And I think you have found a good way to solve the workflow. And I think this would be possibly to build aswell. We are you our own software, Ctrl InDesign Application Server (CIDAS) to build workflows around InDesign Server. And we have done some near what you descreib here. So if you need software to watch folders and trigger scripts on one or more instances of InDesign Server, and if you need coding help, contact me and we can give you some pricing.
    Regards
    Tobias

  • Building tree from xml

    i have an xml file and trying to build a tree out of it.
    can anyone please help me what is the best way to do that?

    Or any DOM parser, including the one built into the standard Java API.

  • Export Release Build for datagrid [xml file doesnt show?]

    SRC folder
              assets
                        icons
              db.xml (located within assets folder)
    datagrid.mxml
    default.css
    I am able to load the database and it populates my "db.xml" with no issues, however when I export release build and run the app - the database displays but with no information?  I noticed that the my "db.xml" was not exported as well.
    It is set up correctly? or do I need to just drop my icons, db.xml within src folder and not seperate them?
    thanks

    When you export a release build, it takes all your MXML And ActionSCript files and turns them into a SWF without the extra debugging code.  If you are not embedding the XML in the swf, then this is expected behavior.
    In your project properties, under Flex Compiler you can try checking the "copy non-embedded files to output folder"; but I believe this is only for debugging purposes and not for exporting a release build.

  • How to build VI using XML commands

    I would like to build vi's using XML commands. Can someone point towards tutorials, other info.
    Thanks,
    Kevin

    You might wish to check out object oriented programming or plugins.
    In your case, OOP should let you design several types of tests and choose between them at run-time. The basic idea in this case is that each class (type) will have some configurable options (which will be coded beforehand) and the users will select the type of the class and then its options. If you want an example, think of the properties page you can get by right clicking a control. Depending on the control type you get different tab pages and options.
    Full native OOP is available in 8.2 or later, but there are some implementation for earlier versions as well (you can try searching for GOOP).
    Plugins allow you to define a basic interface for something and then use different versions which use this interface at run-time. Again, a search should yield some examples.
    Try to take over the world!

  • Build GUI using XML

    Hi,
    I am interested in learning more about building a UI using XML...any suggestions? I have looked at SwiXml ....just looking for more. If you have used one/or more of them before, let me know what your opinions are to.
    Thanks!

    I know there are several of these things out there. The one I've tried was Thinlets. It looks good and is very lightweight. It's easy to get something running quickly, but you'll eventually run into limitations since the components are by far not as rich and flexible as swing. I still think it's great for what it does.
    If you're going to do a google search, I think one of the key words to use is XUL.

  • Oracle Reports Builder - RDF vs XML

    Hi
    I was wondering if there are any major differences between RDF and XML versions of reports and any issues with deploying xml to the report server?
    XML would certainly be easier to version control.

    Hi,
    The XML version is easier and portable as you told.
    But it has some problems too, The package body will not come properly when we convert for example.
    Better to use standard format until otherwise, the Corp corrects the issues with XML version.

  • Flash Builder mobile - complex XML reading

    Hello Developers,
    Please help me! I'm trying to develop a mobile app, that displays a complex xml file (i'm not a developer, so please be patient... ). Here's the xml file, then I write what I'd like to do:
    <?xml version="1.0"?>
    <server_status>
    <hosts>
       <host>
          <host_name>server1</host_name>
          <modified_attributes>0</modified_attributes>
          <check_command>check-host-alive</check_command>
          <check_period>24x7</check_period>
          <notification_period>24x7</notification_period>
       </host>
          <host>
          <host_name>server2</host_name>
          <modified_attributes>0</modified_attributes>
          <check_command>check-host-alive</check_command>
          <check_period>24x7</check_period>
          <notification_period>24x7</notification_period>
       </host>
    </hosts>
    <services>
       <service>
          <host_name>server1</host_name>
          <service_description>C:\ Drive Space - Exchange Edge 1</service_description>
          <modified_attributes>0</modified_attributes>
          <check_command>check_nt!USEDDISKSPACE!-l c -w 80 -c 90</check_command>
              </service>
              <service>
          <host_name>server1</host_name>
          <service_description>CPU Load - Exchange Edge 1</service_description>
          <modified_attributes>0</modified_attributes>
          <check_command>check_nt!CPULOAD!-l 5,80,90</check_command>
              </service>
       <service>
          <host_name>server2</host_name>
          <service_description>C:\ Drive Space - Exchange Edge 2</service_description>
          <modified_attributes>0</modified_attributes>
          <check_command>check_nt!USEDDISKSPACE!-l c -w 80 -c 90</check_command>
              </service>
       <service>
          <host_name>server2</host_name>
          <service_description>CPU Load - Exchange Edge 2</service_description>
          <modified_attributes>0</modified_attributes>
          <check_command>check_nt!CPULOAD!-l 5,80,90</check_command>
              </service>
    </services>
    </server_status>
    As you can see, there's 2 main nodes: hosts & services. On the opening screen of the app I can list the hosts displaying in a list the host nodes with host_name. That's fine. I select one of them and on the new view I show the selected host attributes like <modified_attributes>, <check_period>, etc. What I want is to display on this screen the selected host's services. Under the <services> node there are 4 <service> child node: 2 services for host1 and 2 services for host2. I only want to list those services that are belong to the host I selected on the main view.
    Please write me the source code of the solution either here or in email ([email protected])
    Thanks for your help!

    Really thanks for your reply, but I don't really know, where and how to put in the code. Here's the mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:szolgaltatas="services.szolgaltatas.*"
                        title="DetailsView"
                        viewActivate="getDetails()"
                        >
              <fx:Script>
                        <![CDATA[
                                  import mx.events.FlexEvent;
                                  [Bindable] private var ha:String;
                                  [Bindable] private var hb:String;
                                  [Bindable] private var hc:String;
                                  [Bindable] private var hd:String;
                                  import valueObjects.Host;
                                  import valueObjects.Service;
                                  private function getDetails():void
                                            var thisItem:Host = data as Host;
                                            ha = thisItem.last_time_up;
                                            hb = thisItem.last_check;
                                            hc = thisItem.plugin_output;
                                            hd = thisItem.host_name;
                                  protected function textArea_creationCompleteHandler(event:FlexEvent):void
                                            getDataResult.token = szolgaltatas.getData();
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <s:CallResponder id="getDataResult"/>
                        <szolgaltatas:Szolgaltatas id="szolgaltatas"/> <!-- Szolgaltatas service -> getData(): Service[] -->
              </fx:Declarations>
              <s:Label top="10" left="10" right="10" text="Time Up: {ha}"/>
              <s:Label top="30" left="10" right="10" text="Last Check: {hb}"/>
              <s:Label top="50" left="10" right="10" text="Check Result: {hc}"/>
              <s:Label top="90" left="10" right="10" text="Hostname: {hd}"/>
              <s:TextArea id="textArea" left="10" right="10" bottom="10" height="50%"
                                            creationComplete="textArea_creationCompleteHandler(event)"
              />
    </s:View>
    Thank you Jakub!

Maybe you are looking for

  • Reg:Email to mutiple users

    Dear All,        I created a work flow which will send mail to the user .But i got a new requirement of sending mail to multiple user .These multiple users vary from department to department in organization so I created a method in Bus object to get

  • Changing all document color to CMYK + inserting corner marks

    I have two queries regarding Illustrator: 1) I have a document including both pantone and CMYK colors, as well as both traditional black and process black. How do I convert all color in the document to CMYK? 2) I have sent material to our priting hou

  • What should i do to implement Data Archiving and Data Reporting

    we want to implement Data Archiving and Data Reporting in our product. Can someone tell me what techniques or approaches people take in general to implement Data Archiving and Data reporting. i am currently looking into DataWarehousing. is this the r

  • Record Count + Resultset

    Hi All, I am executing a query in back and returning ref cursor to front end. Before returning recordset, I am doing record count. If record count is more then max record count defined, then I do not return any recordset. Now the problem is that I ha

  • Error Launching OracleManagement Server

    Hi, I have installed Oracle 8.1.6 R2 on Window NT4.0 Professional. My machine has 17GB HDD and 128MB RAM. When I try to start my Oracle Management Server from Control Panel-Services, it gives error like this "Could not start the OracleManagementserve