The analysis of the xml in a text field string

I call a Web service that returns a string in XML format as follows:

< TemplateList >

< template >

< ID > 0 < /ID >

< category >

< name > Mine now < / name >

< product >

< ID > 0 < /ID >

< description > SOLE HEEL CUP STAR JR. BLUE < / Description >

< HDMSProductId > 227 < / HDMSProductId >

< LawsonId > 216156 < / LawsonId >

< PopupMessage / >

< price / >

< / product >

< / category >

< category >

< name > old new < / name >

< product >

< ID > 0 < /ID >

SMALL SLEEVES < description > TUBE PEDI-FOAM < / Description >

< HDMSProductId > 224 < / HDMSProductId >

< LawsonId > 216152 < / LawsonId >

< PopupMessage / >

< price / >

< / product >

< / category >

< category >

the four-legged < name > < / name >

< product >

< ID > 0 < /ID >

SMALL SLEEVES < description > TUBE PEDI-FOAM < / Description >

< HDMSProductId > 224 < / HDMSProductId >

< LawsonId > 216152 < / LawsonId >

< PopupMessage / >

< price / >

< / product >

< / category >

< category >

Spirit of < name > < / name >

< product >

... etc.

< / product >

< / category >

< / template >

< / TemplateList >

I am drilling down to retrieve this string data. What is the best way to do so in the form of LC Designer?

I tried to link the result to a text box and use applyXPath, but it's complicated when there is more than 1 product to go. Suggestions and examples are greatly appreciated!

Hello

What do you call the Web service.  If you use a data connection, and then you normally would bind a field to the result (even if this field is hidden).  If you use NET. SOAP, by default, you will get a return JavaScript object.

But to answer your question, you can use E4X

var responseString = "';

responseXML var = new XML (responseString);

for each (var in responseXML.Template.Category category)

{

Console.println (category. Name + "" + category. Product.Description);

}

Concerning

Bruce

Tags: Adobe LiveCycle

Similar Questions

  • Is it possible for someone to insert a logo when you fill out a form to fill out? I'm looking for all the options under the button 'add a text field.

    I have created a form to fill out that is a contract, but I need a way for the person who is to fill the form to insert their logo.  Is it possible for someone to insert a logo when you fill out the form to fill out? I'm looking for all the options under the button 'add a text field.

    It is not possible within a text field, either. If they have Acrobat, they can use the built-in under Tools - editing content Add Image tool.

    If they drive XI or higher, they can use a button form field you will need to set up for them, but the image must be in PDF format.

  • HELP - lost the button "calculate" in the "text field properties"! I try to summarize the total for separate text fields in a summary box.

    Help, please!  I try to summarize the total for separate text fields in a summary box, but have lost the tab 'calculate' in the 'text field properties area.  Any help would be greatly appreciated!

    When in forms editing mode (Tools > prepare form), select: more > return to the Acrobat form

    In the future, check the box 'this document requires signatures' when you choose at the beginning: Tools > form prepare

    unless you plan to use the form with eSign Document Adobe cloud service.

  • Problems with the filling of a text field with 2 other fields data


    I have 3 domains Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.

    Tools_1a_pri is a drop-down list box with a predefined list. One of the options is the 'other '.  If 'Other' is selected, the text Tools_1a_pri_other field becomes visible for users to enter the name of the other tool.

    The Tools_1a_pri_txt is a text field with a calculation that shows a text indicating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.

    When I select one of the predefined tools, everything works.  When I choose the other, it seems that nothing has changed.  Must I click another field before.  It's confusing for the user.

    Tools_1a_pri validate code
    this.getField("Tools_1a_pri_Other").display = event.value is "Other"? Display.visible: display.hidden;

    Computer Tools_1a_pri_txt code
    If nothing is selected, follow these steps
    If (getField("Tools_1a_pri").value.length < 2) {}
    event.target.textColor = color.red
    Event.Value = "no identified main tool";
    } else if (getField("Tools_1a_pri").value! = 'Other') {}
    If not do that if the other is selected
    event.target.textColor = color.black
    Event.Value = getField("Tools_1a_pri").value;
    } else if (getField("Tools_1a_pri").value = 'Other') {}
    If not do so if the other is not selected
    event.target.textColor = color.black
    GetField("Tools_1a_pri").value = Event.Value + "-" + getField("Tools_1a_pri_Other").value;
    }

    You have made the classic mistake of using the assignment operator in a statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = 'Other') {}

    To do this:

    } Else if (getField("Tools_1a_pri").value == 'Other') {}

  • Check the boxes based on the value in a text field

    Hello.

    I'm building a pdf form in Acrobat Professional X. I want to add JavaScript to two checkboxs to achieve the following objectives:

    If the value of a text field (TLigne) is equal to 61, 64, 66 or 67, the first box (PlanACheck) has the value of the object of an audit.  If the value of a text field (TLigne) is equal to 60, 62 or 63, the second box (PlanBCheck) has the value of the object of an audit.

    I have no other than copy and paste Javascript experience, so I'm not sure I use the right language to research. If anyone can provide guidance, I would be very happy.

    Thank you very much!

    Usually this kind of thing will run the custom calculation of the target field script, but the boxes is not a calculation script, so we'll use the text for field Validation script do, with this code:

    this.getField("PlanACheck").checkThisBox (0, (event.value == "61" | event.value == "64" | event.value == '66' | event.value == "67"));

    this.getField("PlanBCheck").checkThisBox (0, (event.value == "60" | event.value == "62" | event.value == "63"));

  • Referring to the value of a text field, not the legend

    How to refer to the value in a text field to make the data entered by the user "BOLD" / no fat without the caption of a field text in bold or not bold?

    Hello

    Two lines should do. The first turn the caption and the "BOLD" value, then the second changes the legend of back to normal:

    TextField1.font.weight = "bold";
    TextField1.caption.font.weight = "normal";
    

    Hope that helps,

    Niall

    Ensure the dynamics

  • Try to retrieve the contents of a text field and use it in a conditional statement

    Hello world

    I have a form with a text field and a button. The text field is called "orderNo" and the button is called "genOrder".

    Initially, the text field is empty, and clicking on the button fills the text with an appropriate order number field.

    I have need to check the text field for the data (content) before you write the order number, in this way, if an order number is already present in the text field, it will be over written.

    My intention is to use an if / else structure to perform the tests, but I do not know how to retrieve the content of the text field (if the content is present!).

    If anyone can suggest how I can go about extracting the contents of a text field and then use it in an if / else statement it will be greatly appreciated.

    Kind regards

    DAVO

    currentOrderNo = this.getField("orderNo").value;

    If ("currentOrderNo == null | currentOrderNo ==" ") {}

    the field is empty, fill it with a new value

    } else {}

    the field is not empty, something else

    }

  • change the visulas of a text field

    Hello!

    How do heck you change the attributes of a text field that is in a form. IM particularly interested in the color and size of the box itself. I guess that this is done in css, if so that the CSS properties do change?

    Thank you very much and MERRY CHRISTMAS!

    Does that help?

    http://articles.SitePoint.com/print/style-Web-Forms-CSS

    Martin

  • Try to highlight the rectangle of a text field

    I'm trying to point out the rectangle of a text field with an Annotation of the line, but I'm a bit confused.

    The first doubt is on the 'Square' vs 'Rectangle' annotations What is the difference between them? Adobe has those changed recently?

    I tried several variations of the following code snippet:

    var x 1 = textField.rect [0];
    var y1 =
    textField.rect [1];
    var x 2 =
    textField.rect [2];
    var y2 =
    textField.rect [3];

    var this.addAnnot({) = underline
    page: 0.
    type: 'Line ',.
    Rect: [x 1, y1, x 2, y1],.
    strokeColor: color.red,.
    strokeWidth: 160
    });

    What I get is a line of identity (e.g., 45 degrees) in the lower left corner.

    -Ramon

    The square rect sets top-left-x, top-left-y, down, left - bottom-left-y and x.

    For a line, it is left-x, left-y, x-right, right-y.

    So if you want the line to be under place, use the background values of the place to place the line.

  • The legend of a text field border

    Does anyone know how to get the edge of the legend of a text field and the value section is visible to a user of the form?  It's a bit confusing when someone enters a field, and there is no line between the legend, they can't change it, and the value, they need editing.

    Choose different skins for the field will make very clear. If you choose to have no appearance there is no deliniation between the two. You can set up to change the background color of the zone to enter and deliver it to the output. This technique will highlight the field that has the focus, and there is no doubt as to where the field stops and starts.

  • Click and drag in the Favorites or in text fields does not

    Click and drag does not work with favorites anywhere, or any text fields. He used to work a lot in v11, but not v12

    I tried to revert to my version of Firefox v11 backup but it keeps automatically updated to v12 despite disabling auto update in the preferences and even when it is offline - frustrating.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

  • What JavaScript I use to add the name of the file to a text field?

    Without being a JavaScript novice, it is a JavaScript that I can cut and past which would automatically add the file name to a text field in the form when the form is opened?

    Thank you very much.

    Yes, copy the following code:

    this.getField("Name_of_field").value = this.documentFileName;

  • Create the hyperlink in a text field

    I have a form that collects data from a customer. The number of customers is their phone number. This issue is already known and stored in a "cPhone" text field in the form. After all data are collected on the form, I then need to browse the site of customers the last part of the url of the site corresponding to their phone number that is already stored in the field "cPhone. What I want to do is to create a hyperlink to the Web site, that ends in the number of customer phone and when you click it it will take you to this Web site. For example, the url of the Web site might be www.mywebsite.com/main/active/ and my clients, 'cPhone' telephone number is 800-555-5555, when some kind of action is taken, the two are combined, and then it takes me to this Web page.

    Is they are combined and an action is created to open a web link, or a hyperlink can be created on the page that can be clicked, or anything else in the meantime. Is this possible?

    Probably the simplest is to use a button. The action could be a JavaScript like:

    Script mouse upward to a button

    app.launchURL ("http://www.example.com/main/active/"+ getField("cPhone").valueAsString, true);

    In practice, you'll want to check the value of the number field phone to see that it is not empty and is over, but this should help you get started.

    You can use the buttonSetCaption method to set the label of the button to the URL, perhaps in the phone number field Validate event.

  • How to set the size of a text field

    I use the command

    #get - vm | Select name, folder

    The values that I get are truned.

    Please can someone explain how can I set the length of a text value?

    Concerning

    Marius

    The performance engine uses the rules of display and formatting the required properties on the limited space of the screen of the console.

    There are ways to influence the results.

    Get - VM | Select name, file | Format-Table - AutoSize

    Get - VM | Select name, file | Format-List

    Get - VM | Select @{N = "Name"; E={$_. {{Name.SubString (0.6)}}, @{N = 'File'; E={$_. {{Folder.SubString (0.10)}}

  • How do fill you a text field based on the entries in other text fields?

    I would like to be able to have a text field that fills as 'Full' or 'Incomplete' based on the question if all required fields have been filled or not.

    For example, if the "First Name", "Last Name" and "City" text fields are not filled, the text of "the State of completion" field displays 'Incomplete' and once they are filled, the text of "the State of completion" field will turn into "Complete".

    How can I do this using javascript? I searched the web for a tutorial, but most of the results seems to be focused on the menu drop-down.

    Please point me in the right direction!

    Try the script below. I put this on the calculate for Field1 event

    If (FirstName.rawValue == null |) LastName.rawValue == null | City.rawValue == null) {}

    Field1.RawValue = "incomplete."

    }

    on the other

    Field1.RawValue = "complete."

Maybe you are looking for

  • How to remove SafePrice? And where did it come from?

    This small bar guard appearing at the top of my screen says there are better buys elsewhere. It is always wrong. I don't know where it comes from. How can I remove this 'thing'?

  • How do I turn OFF the fn on Sat Pro C660

    Hello I have a satellite Pro C660 PSC1ME and I was wondering how can I disable the "FN" key to prevent others to pass the wifi and disable the mouse (it's a mobile multiuser). Thank you

  • HP Mobile Printing on the Samsung Galaxy S4 - no app needed

    Watch this video YouTube showing the ease of printing for your HP printer is from the smartphone Samsung Galaxy S4. http://www.YouTube.com/watch?v=P6dQeRhkbIE Best.

  • Help HP envy dv7 DV7-7259NR ram/graphics card

    Hello world!I bought this laptop not for long, and I was wondering if the graphics card and ram are extensible. There 8gig of ram and a GeForce GT 630 M.I really want to move the ram to 16g and the video card can e on the road.Any advice would be muc

  • Do not download in the library of songs iTunes purchased

    I have an album that I bought on iTunes. It shows as purchased on iTunes. However, it will not download on my Mac. For this, do not show in my list of "Bought not in my library", but did see in my shopping list (both in my account list) and in the iT