How to select path from an XML data file?

I have an XML data file somewhat like the one below with up to five levels deep (variable). I want the user to be able to pick a path by navigating a tree (i.e. Canada/Alberta/Calgary) and have that path put into a data field. If they only navigate part way into the path (i.e. Mexico/Sonora) then that would go in the data field. I have some control of the structure of the XML as I am creating it from a CSV file.
Any examples or good advice that you can provide is greatly appreciated. I'm OK manipulating XML but am quite a newbie at PDF forms & Javascript.
<location>
    <country name="Canada">
        <prov-state name="British Columbia">
            <city name="Victoria" />
            <city name="Nanaimo" />
        </prov-state>
        <prov-state name="Alberta">
            <city name="Calgary" />
            <city name="Lethbridge" />
        </prov-state>
    </country>
    <country name="Mexico">
        <prov-state name="Sonora">
            <city name="Guaymas" />
        </prov-state>
    </country>
</location>

Not sure I follow ....are you going to give the user a visual representation of the XML and let them choose then you
will put the path into a field?
Paul

Similar Messages

  • How Do I convert image in xml data file back into a JPG?

    I have a user submitted for with an image field and some text fields on it.
    User uploads an image, enters text, clicks submit by email.
    I get the xml data file by email.
    I create a spreadsheet from it.
    text field data is there, in the image field column theres the encoded in text image.
    how do I convert that back into an actual jpg??

    Simply to review proper proceedure and verify we are all on the same page.
    First, set Pan Mode to Stereo Left/Right.
    Then you need to change the XHA1's "Stereo" configuration to "Dual Mono". 
    Each will then automatically pan to the center. 
    Then turn one of the channels off.
    This will work in either the Browser or in a Timeline.

  • How to Edit a XML data file from AS3 class...

      Hi...
                 I need to edit an XML data file I have at the exit of application.... I have a demo code which is not working....
    This is the code :
    public function UpdateData():void
                   trace("Closing....");
                   var FileData:XML=<Hello>Hai</Hello>
                   var urlLdr:URLLoader = new URLLoader();
                   var urlRqst:URLRequest = new URLRequest ("AppData.xml");
                   urlRqst.data=FileData;
                    urlRqst.contentType = "text/xml";
                   urlRqst.method = URLRequestMethod.POST;
                   urlLdr.load(urlRqst);
    This AppData file already exist and has some data in it.
        Plus :
       How to find the application is exiting.

    use:  fscommand('Quit');
    to exit your app.
    and this is how you would use the urlloader class to save data:
    public function UpdateData():void
             trace("Closing....");
              var FileData:XML=<Hello>Hai</Hello>
    var urlVar:URLVariables=new URLVariables();
    urlVar.fileData=FileData;
                var urlLdr:URLLoader = new URLLoader();
               var urlRqst:URLRequest = new URLRequest ("this must be an executable to parse and write data");
               urlRqst.data=urlVar;
               urlRqst.contentType = "text/xml";
                   urlRqst.method = URLRequestMethod.POST;
                  urlLdr.load(urlRqst);
    but i don't think you can use an executable on a fl4 device so you will need to use a different class.  i don' know how you're storing an xml file on a fl4 device but you should be able to use the sharedobject to read and store xml.

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Forms pulling Multiple Records from an XML Schema and XML data files - Adobe LiveCycle Designer

    I built a form in Adobe LiveCycle with an xml schema and data file.  The problem is with how the form renders the xml data file.
    I have a statement element that consists of about 6 fields (statementID, statementName, statementAddress, statementCountry, statementZip, statementDate, etc) of data in the schema that allows for multiple iterations - so one xml data file can contain multiple statements. These fields allow for null values.
    But here's the problem:  When any of the statements - say statement 2 of 6 - has a null value in one of the fields, if the xml data file doesn't have a placeholder
    (example of placeholder:  <statementName type="String"/>   )in the xml for that field, my form pulls the field value from the NEXT statement.
    This corrupts all the rest of the statement records, as this field is shifted up for all the rest.
    I know that in the past I haven't needed a placeholder when a field was null. But I'm wondering if when the data allows for multiple records the xml data file needs to generate the placeholder.  And where is the problem? In the Schema? The xml data file? My form?  And the 64-thousand-dollar question:  How to fix it?

    If your <statement> element is the one that repeats, it should be bound to a subform with the binding string of something like $.statement[*]. Then in that subform should be your fields and they should have bindings of $.statementID, $.statementName, $.statementAddress, etc.
    Kyle

  • Use of PL/SQL to populate table columns from XML data file

    I'm trying to find the easiest way to transfer data from a flat file that is in XML format into a traditional Oracle table. Not retaining the XML but actually map an XML element to a column so standard SQL, Forms, Reports, etc can access like it was created using a Form.
    Example: Table A has column names Tom, Dick and Harry and the XML file has elements Tom, Dick and Harry and I just want a function that maps and inserts/loads the data into Table As individual columns.
    The process needs to be easily initiated by an end user. The user gets the XML data file via an email attachment and needs to do something like a Concurrent Request to pull in the file and load it. Using PL/SQL would be great.
    I appreciate any help that can be provided.

    Hi,
    HELP!!!!!
    We are having the same problem and we are using oracle 10ir2.
    We create an object type (sql type globally not in a package):
    CREATE OR REPLACE TYPE G_EX AS OBJECT
    ( EX_ID NUMBER ,
    EX_CON VARCHAR2 ( 100 ) ,
    EX_L VARCHAR2 ( 30 ) ,
    EX_T VARCHAR2 ( 4000 ) );
    CREATE OR REPLACE TYPE G_EX LIST AS TABLE OF  GEX AS ;
    then we insert data through a bulk collect within the package with the table declared of this array of object types:
    v_table G_EX _LIST:= NULL;
    SELECT G_EX (ex_id
    ,ex_con
    ,ex_l
    ,ex_t )
    BULK COLLECT INTO v_table
    FROM exs_lookup;
    I am using the syntax (below) but it gives PL/SQL: ORA-00902: invalid datatype
    sometimes not always:
    SELECT G_EX ( ex_id
    ,ex_con
    ,ex_l
    ,ex_t )
    BULK INTO v_data_record
    FROM TABLE (v_table)
    WHERE ex_id = p_key;
    where p_key - is a number type
    and v_data_record is a G_EX object type.
    I was wondering if anyone else encountered a similar problem, and knows what we may have done wrong. Since we dont understand why this piece of code is throwing this ora-00902 errors occasionally not always.
    Also, if we restart the database up once this errors occurs it appears to stop throwing this ora_00902 error for a lenght of time. Then it comes up with the ora-00902 error again (why?)
    thanks

  • I loaded my ipad photos from camera and all the pictures sorted by date.  Next, I did a sync with my computer and the photos were all reorganized into IMPRT folders an out of date sequence.  Any idea how to put the photos back into date files?

    I loaded my ipad photos from camera and all the pictures sorted by date.  I later sync my ipad with my computer and the photos were all reorganized into IMPRT folders an out of date sequence.  Any idea how to put the photos back into date files other than reloading all of them from camera?

    What version of iPhoto?
    Select one and rotate it. Then rotate it back. Does that make it appear? 
    A much better work flow is the keep the photos after importing.  Check the success the import, wait for at least one successful backup cycle then use you camera's format command to reformat the card
    LN

  • Using Labview how can one store different data in different sheets of same excel file, I mean how to select different sheets to store data??

    Hello Everyone,
    I want to store various data but in different sheets of excel file. So how to select Different sheets of same excel file???
    Thanks so much 
    Pallavi 

    aeastet wrote:
    Why do you not want to use Active X?
    One very good reason that I can think of is that MS keeps changing their ActiveX interface with each version of Excel, so code written for one version of Excel using ActiveX may not work for another version of Excel, even though the basic functionality hasn't changed. A perfect example is when MS changed the "Value" property to "Value2". Yeah, that made a whole lot of sense.
    pals wrote:
    I dont want to use active X as i am not
    getting results... by using write to spreadsheet in am getting results
    but on just one sheet... I want different data on different sheets of
    same excel file. So....
    Can anyone help me in this...
    Then it's something you're doing. Please post your code. Have you tried a search on this forum for ActiveX and Excel? There have been tons of posts on it, including lots of examples. There's also the Excel thread.

  • How to insert a new line character inside CDATA tag in the source xml data file?

    values for form fields in the xml data file is contained inside CDATA tags which is an Unparsed Format.
    Eg: [CDATA[IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665]] delimited by "~" char
    Actual o/p:-
    IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665
    Expected o/p is like :-
    IBM-01
    DSHFSJDSJ
    FGFGFJ,
    VA 665665
    live cycle product does not interpret ~ as a newline character. Please suggest which character should be used instead inside CDATA section or if there is any other way to fix this?

    I do not have any problem while using IE's XML parser
    for XML+XSLT merging.That is because IE's parser does not implement XML correctly.
    But when I use JAXP's Transformer object, it does not
    preserve the new lines inside attribute values and
    converts those into white spaces.That is exactly what the XML specifications say should happen.
    >
    ----If you have text that contains newlines, you
    should put it in an element, not in
    ----an attribute.
    That would be my last solution. But I'd really hate
    to change my logic just 'coz JAXP is not capable of
    handling new lines inside attribute values. I may be
    wrong... but If IE can keep those then there has to
    be a way to do the same from server side merging....Sure. Write your own parser with the same bug in it. But you don't have any right to demand that other people supply you with parsers that work incorrectly.

  • Script code sample for looping  through the records from xml data file in formCalc script

    Hi
       I have a xml data file which contains a sequence of repeating applicant data like given below
                       US
                       II
                       CEO
                       Mr
                       111111111
                       0000000111
                       GuarantorA
                       111
                       IN
                       11111
                       WILLIAMS1
                       R3
                       KENNETH1
                       City1GU
                       PA
                       1934-03-14
                       [email protected]
                       GU
                       R
                       113 Lazlo LaneCA
                       Suite 3500CA
                       OaklandCA
                       TX
                       11345
                       AL
    I want to assign a textfield with a value based on the value of coap_flag.
    So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
    I am new to Adobe livecycle...Please help me how it can be done.
    I have developed something like this
    foreach Item in ($record.applicant[*].coap_flag) do
    test.value=Item
    if(test.value=="MA")then
    concat($record.applicant.first_name,$record.applicant.middle_name)endif
    endfor

    Using the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br />     //set the currentElement to the 1st child node<br />     currentElement = obj.item(i);<br />     //Check to see if it is an applicant node<br />     if (currentElement.name == "applicant"){<br />          //It is an applican, now find the coap_flag node value and write it to the text field<br />          TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br />     }<br />}

  • Loop through the records from xml data file in formCalc script

    Hi
       I have a xml data file which contains a sequence of repeating  applicant data like given below
                               US
                                II
                                CEO
                                Mr
                                111111111
                                0000000111
                                GuarantorA
                                111
                                IN
                                11111
                                WILLIAMS1
                                R3
                                KENNETH1
                                City1GU
                                PA
                                1934-03-14
                                [email protected]
                                GU
                                R
                                     113 Lazlo LaneCA
                                     Suite 3500CA
                                     OaklandCA
                                     TX
                                     11345
                                     AL
    I want to assign a textfield with a value based on the value of coap_flag.
    So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
    I am new to Adobe livecycle...Please help me how it can be done.
    I have developed something like this
    foreach Item in ($record.applicant[*].coap_flag) do
    test.value=Item
    if(test.value=="MA")then
    concat($record.applicant.first_name,$record.applicant.middle_name)endif
    endfor

    Using the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br />     //set the currentElement to the 1st child node<br />     currentElement = obj.item(i);<br />     //Check to see if it is an applicant node<br />     if (currentElement.name == "applicant"){<br />          //It is an applican, now find the coap_flag node value and write it to the text field<br />          TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br />     }<br />}

  • How to select 2column from 1 column values

    Hi All,
    How to select 2column from 1 column values
    Ex : In Emp they have JOB column
    JOB
    CLERK
    MANAGER
    SALESMAN
    MANAGER
    MANAGER
    ANALYST
    PRESIDENT
    SALESMAN
    CLERK
    CLERK
    ANALYST
    CLERK
    here i want to get output like as follows
    Ex: ejob1 ejob2
    ANALYST SALESMAN
    ANALYST SALESMAN
    Can anyone helps me in this,it is urget
    Thanks,

    Something like
    select a.job, b.job from scott.emp a, (select job from scott.emp) b
    CLERK     CLERK
    CLERK     SALESMAN
    CLERK     SALESMAN
    CLERK     MANAGER
    CLERK     SALESMAN
    CLERK     MANAGER
    CLERK     MANAGER
    CLERK     ANALYST
    CLERK     PRESIDENT
    CLERK     SALESMAN
    CLERK     CLERK
    CLERK     CLERK
    CLERK     ANALYST
    CLERK     CLERK
    SALESMAN     CLERK
    SALESMAN     SALESMAN
    SALESMAN     SALESMAN
    SALESMAN     MANAGER
    ...

  • Problem generating XML data file through XSD

    Hello there,
    I'm trying to generate an XML data file as per the below steps:
    Making a normal schema in query transform.
    Mapping desired source column into query schema.
    Right click on query transform and generating XML schema (XSD) in my local system.
    In object library XML file format adding the XSD with schema as a root element.
    Creating target instance from object library XML file.
    In target file specifying file creation path in my local system. 
    After performing above steps and executing the job getting below error.
    Any help on this will be much appreciated.
    Regards,
    Jagari

    I found some code looking at a similar issue - I don't know how to recover other data (in I guess) the rest of the HTML in the code. I need to find a better reference with details and examples.
    I fixed it by changing:
        ssDebug.trace(moreStuff.xliff.file.body.trans-unit); // - error
    to:
       ssDebug.trace(moreStuff.file.body['trans-unit']); //- no error
    with expected output (no error):
    <trans-unit id="001" resname="IDS_ZXP7_JAM_01">
      <source>If, while you are printing, your printer stops, ...</source>
    </trans-unit>
    <trans-unit id="002" resname="IDS_ZXP7_JAM_02">
      <source>look at the Operator Control Panel (OCP) for the fault description.</source>
    </trans-unit>
    <trans-unit id="003" resname="IDS_ZXP7_JAM_03">
      <source>If the fault is a card jam, open and close the Print Cover (or Options Cover).</source>
    </trans-unit>
    <trans-unit id="004" resname="IDS_ZXP7_JAM_04">
      <source>The printer will initialize and move the jammed card to the Reject Bin.</source>
    </trans-unit>
    <trans-unit id="005" resname="IDS_ZXP7_JAM_TITLE">
      <source>Card Jam</source>
    </trans-unit>

  • Want attach the XML data file with layout template in Oracle 10g

    Hi All,
    I need a help from you genius guys.
    I am genrating reports in BI with xml the procedure which I am following is as below.
    1. generating XML from the RDF
    2. creating a template in .rtf format
    3.after that loading the xml to the template then getting the required report.
    This all is doing through the given buttons
    But now my requirement is to create the gui from user can select the report and get the desire output file so how we would be able to attach the XML data file with layout template in Oracle 10g.
    If you require more detail please let me knnow.
    Thanks,
    Harry

    I am not using Oracle apps.
    I am using oracle 10g reports and I get something in it like one patch I downloded and one java code is having which creates the batch file ...still I am working on it ..
    If you will get some please share so that it will be helpful.
    Thanks,
    Harry

  • Include xml data file in Flex Library Project

    Hi all,
    i've got a Flex Library Project in which I include some
    assets, as css files and some xml data files too. They are located
    in my project root, under /assets/css and /assets/data. Once
    compiled, if I use my library in other projects, the css styles
    from the css under /assets/css apply, but the xml data files are
    not found.Both are checked in the Flex Library Build Path window of
    the project's properties.
    There's any reason why the xml files are not included? Or
    should I reference them in some other way... In my library project
    I'm doing: ' theHTTPService.url = "assets/data/data_file.xml" '
    thanks in advance,
    Marc

    Hi Greg, thanks for answering.
    Yes, that's what I'd like to know also... I mark it to be
    added to the library, but how can I be sure if it's in the final
    .swc? Are they browseable somehow?
    thanks,
    Marc

Maybe you are looking for

  • Pass blank value to a parameter

    Hello Experts I am using Crystal Reports 2008 with SAP BW as a data source. SAP query has a string parameter created in it, and I want to apply condition on that parameter. If user enters a value which is not in that parameter (field) then report sho

  • How to use Sharepoint 2013 img file

    Hi, I downloaded Sharepoint 2013 as an img file. I am trying to install it on VMWare 5.1 which only accepts ISO files. How can I convert the img file to ISO or what other workarounds are available? I already tried renaming the file to ISO, but it did

  • After Lion Reinstall, Safari Crashing

    I reinstalled Lion on a new hard drive in my 2008 iMac. Then restored from a Time Machine backup. Can't get Safari to work at all, just keeps giving me a crash report. Can I fix this without reinstalling again? Here's what the report states: Process:

  • SIII S3 How do I send a long text message conversation to my email account?

    I have a need to put my text message over the course of the past 4 months into an email to give to my attorney. How do I tell my phone to send me the conversation? I do not want to copy each piece and mail it as it is a discussion over over 4 months

  • OpsMgr Warning events (Source: HealthService; Event ID: 1207)

    Hello, Literally hundreds of the following Warning messages are being generated per hour on all 5 nodes in one of on of our MSCS 2003 clusters:  Source: HealthService  Event ID: 1207  Description: Rule/Monitor "Microsoft.SystemCenter.ACS.Forwarder.Pr