Read bool value from xml

Hi all :
I try to read Boolean value from xml file , please see attach file , all the time this error rise
I know that The XML tag describing the type of data does not match, how can I get Boolean value " 1" or "0 "
Thanks
wisam
Attachments:
untitled1.JPG ‏115 KB

You are not trying to read boolean.. you are trying to read a DBL.
To read a DBL you must first write a DBL to XML.
To read a boolean replace the DBL with a boolean

Similar Messages

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • How to return a bool value from MyBrokerProcess

    To make MyPlugin work in Adobe Reader X in Protected Mode On, i have created a Broker Process(MyBrokerProcess.exe)
    Plugincode(C++)--->BrokerProcess(C#)---->Helper(C#)
    MyPlugin has 4 button, when i click on each button a Window(System.Window.Form) will open and perform its task.
    1.While i trying to close the ActivePDF document , if any of the Windows(System.Window.Form) is open i will display the message saying("Choose YES to Close this Window first Before Closing the ActiveDoc and Choose NO to continue without closing Window and ActiveDoc"). This is taken care in Helper Class(C#)
    2.If the user choose "Yes", then the Helper functin will return 'true' to MyBrokerProcess.
    3.Inturn  MyBrokerProcess has to return this bool value to the PluginCode(C++) which is the only place to  access Acrobat API function to close the ActiveDocument.
    Now i am clueless as to how i have to return this bool value from MyBrokerProcess to PluginCode. Or is there any other way to accomplish the above task. Please some one help me to solve this issue.
    Thanks in advance.

    Hi Richard,
    This is what i tried to do. But i couldnot make MyPlugin work in Protected Mode On.
    Plugincode(C++)<--->BrokerProcess(C#)<---->Helper(C#)
    I added a simple Process between Plugin(C++)code and Helper(C#)code.
    Previously it was like
    Plugincode(C++) <----> Helper(C#)
    Thanks and Regards,
    Chetan.

  • Want to retrieve null value from xml?

    i m writing this code to get the tag name and values from xml file.
    Now the problem is that
    if my xml file contain any tag whose value is not defined like
    <root>
    <firsttag>first</firsttag>
    <Second></Second><Third>third</Third>
    </root>
    Now look if second tag doesnt contain anything ,then i want to add "null" to vector,but it throws null pointer exception because second tag is empty.
    Vector<String> CSWFinfo = new Vector<String>();
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory
                             .newInstance();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   Document doc = builder.parse(new File(xml));
                   Element root = doc.getDocumentElement();
                   NodeList node = root.getChildNodes();
                   for (int i = 0; i < node.getLength(); i++) {
                        Node currentNode = node.item(i);
                        if (isTextNode(currentNode))
                             continue;
                        CSWFinfo.addElement(currentNode.getNodeName());
                        if (null != currentNode.getFirstChild().getNodeValue()) {
                             CSWFinfo.addElement(currentNode.getFirstChild()
                                       .getNodeValue());
                        } else {
                             CSWFinfo.addElement("null");
                   }//end of for loop block
                   System.out.println(CSWFinfo);
              } catch (Exception e) {
                   e.printStackTrace();
                   // TODO: handle exception
              }I am using dom parser .
    Can any one know how to do it????
    Edited by: chauhan2003 on 16 Jun, 2008 12:06 PM

    Are you sure that all currentNode have a firstChild ????
    If your node has no value, it has no child
    So i 'd change code to like look something like:
    if (currentNode.getFirstChild() != null) {
         CSWFinfo.addElement(currentNode.getFirstChild().getNodeValue());
    } else {
         CSWFinfo.addElement("null");
    }

  • Problem reading RFC values from IRecordSet !!!!

    Hi All,
    I am having some problem reading values from IRecordSet. Can not seem to parse the output structure from RFC. AM using connector gateway service to execute BAPI_EXCHRATE_GETCURRENTRATES.
    Here is the code,
    MappedRecord input = rf.createMappedRecord("input");
    input.put("DATE",new String("01011990"));
    input.put("DATE_TYPE", new String("V"));
    input.put("RATE_TYPE", new String("M"));
    MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
    Object rs = null;
    IRecordSet recSet = null;
    Object result = output.get("EXCH_RATE_LIST");
    if (result == null) {
    response.write("<BR>null");
    rs = new String(" ");
    } else if (result instanceof IRecordSet) {
    IRecordSet irs = (IRecordSet) result;
    response.write("<BR>Got some dataaa");
    IRecordMetaData rsmd = null;
    rsmd = irs.retrieveMetaData();
    irs.beforeFirst();
    while(irs.next()){
    response.write("Row::"+irs.getString("RATE_TYPE")+" "+irs.getString("FROM_CURR")+" "+irs.getString("EXCH_RATE"));
    Am getting the pritn statement, Got Some Data on the PDK component.
    But somehow not able to read the values from IRecordSet
    What is the mistake here?
    Pls help
    Edited by: Aakash Jain on Oct 11, 2008 12:22 AM

    Hi
    Try in this way.
    IRecordSet resultTable = (IRecordSet)outputParams.get("TABLE_NAME");
    for(resultTable.beforeFirst(); resultTable.next(); ) {
    response.write(resultTable.getString(0));
    response.write(resultTable.getString(1));
    Thanks

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • Reading the data from XML Source

    Hi
    i want to read the data from XML source file, and update the transaction information to another XML file. how we can do this in ADF, please help
    Thanks
    nidhi

    you may use normal Java API to do that
    http://www.javablogging.com/read-and-write-xml/

  • Reading any value from table into a string (Especially date etc..)

    How would I read any value from a table into a string?
    Currently doing the following...
    data ret_val type string.
    select single (wa_map-qes_field) from z_qekko into ret_val
    where
    angnr = _angnr.
    When the source field is a date it bombs though.
    The result goes into a BDCDATA-fval.
    regards
    Dylan.

    Tried...
    1    DATA: lp_data TYPE REF TO DATA.
    2    FIELD-SYMBOLS: <value> TYPE ANY.
    3    CREATE DATA lp_data LIKE (wa_map-qes_field).
    4    ASSIGN lp_data->* TO <value>.
    5    SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO <value> WHERE angnr = _angnr.
    Complains that (wa_map-qes_field) is not defined in line 3.
    Think that the bracket thing is only available via SQL.
    What about CREATE DATA lp_data type ref to object. ?
    Would the above declaration work?
    regards

  • Subprocess 33 was not successful. Master cannot read return value from S 33

    Hi All,
    We are on BI 7.0 SP 19.
    We have submitted a planning sequence in the background with automatic packaging.
    The planning sequence has two steps:
    Step 1. Z_PLNG_FUNCTION1
    Step 2. Z_PLNG_FUNCTION2
    As per automatic packaging, the system chose 0ACCOUNT for packaging.
    When submitted, each step has been submitted to 30 packages as 30 subprocesses.
    For Step 1, the log shows that All subprocesses  executed.
    For Step 2, the log shows that the subprocess 33 and 58 failed, which means subprocess #3, and # 28 for the step 2 as the subprocess is numbered in the log in combination with step 1.
    The messages in the log for the failed subprocesses are as follows:
    @5C\QError@     Subprocess 33 was not successful
    @5C\QError@     Master cannot read return value from subprocess 33
    @5C\QError@     Subprocess 58 was not successful
    @5C\QError@     Master cannot read return value from subprocess 58
    Our question is on how to find the exact cause of the subprocess failure.
    I tried to look for the details on the error messages, they have been not helpful.
    What is meant by 'Master cannot read return value from subprocess' and how to get the exact cause of the failure?
    Thanks in advance,
    Best Regards,
    - Shashi

    Shashi,
    implement the following notes and check again:1368659, 1525723, 1532061.
    Regards,
    Marc
    SAP Techology RIG

  • Reading each value from spreadshee​t file with delay (multiple rows and columns)

    Hi,
    a) I want to read EACH VALUE from a spreadsheet file having multiple rows and columns WITH DELAY. I am attaching my VI and sample datalog file for reference (tempsensor.txt).I need to do so because as soon as I read put ON the Sensor button on front panel, LV reads all the values at one go. I need the values for each temperature to be displayed after a delay.
    b) Secondly, I would like to read another file containing the state of four antennas (deployed:1; undeployed:0). I am logging state of each antenna in each column of the file(magnet.txt) I need to have four LEDS on front panel to display state of the antennas. I dont know what I have done for antennas in my VI is right or wrong. I guess thats rhe wrong way to approach the problem. Please help!!!(column1: Antenna1 state ; Column2:Antenna2 state.. and so..on..)
    Any help would be greatly appreciated!!
    Thanks in advance,
    Ratnesh
    FYI: The first column in my datalog file represents timestamp(number of seconds elapsed), second column: reading for temperature sensor 1, third column: reading for temperature senosr 2, and so on. I am using approx. 11 temperature sensors.
    Also, I have generated the log files for the reference purpose only. They do not represent the actual values. They are far away from actual values.
    Attachments:
    01032005.zip ‏30 KB

    Look at this modified version of your VI. After looking at it, I determined that a shift reggister was not required in this case.
    Lynn
    Attachments:
    MultiSensors.2.vi ‏85 KB

  • XML parser for fatching multiple values from XML

    Hi,
    In my scenirio i have to facth multiple values from XML file and then set in to Table in webdynpro...
    Fo example my xml has values like...
    <xml>
         <item>
              <item1>
                   <quantity>
                        100
                   </quantity>
                   <price>
                        50
                   </price>
              </item1>
              <item2>
                   <quantity>
                        200
                   </quantity>
                   <price>
                        20
                   </price>
              </item2>
              <item3>
                   <quantity>
                        300
                   </quantity>
                   <price>
                        10
                   </price>
              </item3>
         </item>
    </xml>
    then i have to fcath those quantity and price and set in to table...
    How to do taht in webdynpro and does any one have parser code for retriving multiple values...

    Hi,
    1) You need to use JDOM parser.
    2) The code for parsing XML using JDOM parser is readily available if you search on google.
    3) You will have to check the attribute during every parsing and then if attribute is quantity you can fetch the corresponding tags.
    4) Something similar to this:
    org.jdom.Document document = parser.build(file);
                    org.jdom.Element rootElement = document.getRootElement();
                    org.jdom.Element childElement = rootElement.getChild("file");
                    Element xmlElement = childElement.getChild("item");
                    if (xmlElement != null) {
                        List itemElementsList = xmlElement.getChildren("item1");
                        if (itemElementsList != null) {
                            Iterator iterator3 = itemElementsList.iterator();
                            while (iterator3.hasNext()) {
                                //For each group get quantity
                                Element itemElement = (Element) iterator3.next();
                                List quantityElementsList =
                                        itemElement.getChildren("quantity");
                                if (quantityElementsList != null) {
                                    Iterator iterator2 =
                                            quantityElementsList.iterator();
                                    while (iterator2.hasNext()) {
    // Your code                                                                               
    You might need to make some changes as per your rquirement. Just use this sample to understand how you need to parse the xml
    Hope it helps.
    Regards.
    Rajat
    Edited by: Rajat Jain on Jan 22, 2009 9:51 AM

  • RE: (forte-users) Reading return value from Javaprogram

    when using the RunCommand method you can specify the an error file:
    task.part.os.RunCommand(command = l_tdCommandLine,
    isSynchronous = TRUE,
    inputFile = Nil,
    outputFile = Nil,
    errorFile = l_ErrorFile.GetLocalName(TRUE));
    BEGIN
    l_ErrorFile.Open(SP_AM_READ);
    EXCEPTION
    WHEN Ex: FileResourceException DO
    l_ErrorFile = NIL;
    task.ErrorMgr.Clear();
    END;
    IF l_ErrorFile <> NIL THEN
    l_tdFileContents : TextData = New();
    l_ErrorFile.ReadText(l_tdFileContents);
    l_ErrorFile.Close();
    END IF;
    Have you java program output the return value to the standard IO. This way
    you will have an error file that you can read from Forte.
    ka
    -----Original Message-----
    From: Anthony D [mailto:saigonxyahoo.com]
    Sent: Tuesday, September 12, 2000 7:49 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Reading return value from Java program
    Hi,
    Does anyone know whether Forte application can
    read a return value from a Java program?
    I'm using the RunCmd method to invoke the Java
    program. I'd like to read the return value from the
    Java program. How do I go about doing it?
    Any suggestion will be appriciated.
    Thanks
    AD
    http://mail.yahoo.com/
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    when using the RunCommand method you can specify the an error file:
    task.part.os.RunCommand(command = l_tdCommandLine,
    isSynchronous = TRUE,
    inputFile = Nil,
    outputFile = Nil,
    errorFile = l_ErrorFile.GetLocalName(TRUE));
    BEGIN
    l_ErrorFile.Open(SP_AM_READ);
    EXCEPTION
    WHEN Ex: FileResourceException DO
    l_ErrorFile = NIL;
    task.ErrorMgr.Clear();
    END;
    IF l_ErrorFile <> NIL THEN
    l_tdFileContents : TextData = New();
    l_ErrorFile.ReadText(l_tdFileContents);
    l_ErrorFile.Close();
    END IF;
    Have you java program output the return value to the standard IO. This way
    you will have an error file that you can read from Forte.
    ka
    -----Original Message-----
    From: Anthony D [mailto:saigonxyahoo.com]
    Sent: Tuesday, September 12, 2000 7:49 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Reading return value from Java program
    Hi,
    Does anyone know whether Forte application can
    read a return value from a Java program?
    I'm using the RunCmd method to invoke the Java
    program. I'd like to read the return value from the
    Java program. How do I go about doing it?
    Any suggestion will be appriciated.
    Thanks
    AD
    http://mail.yahoo.com/
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • How will read the value from Adobe Reader/Viewer in c# windows App

    I m using VS2005 . working in windows appliction. i am using adobe Reader 9, Then the new pdf document open  inside the Acrobat adobe reader , Exsiting PDF file is created by Adobe Forms(Adobe LiveCycle designer and Adobe pro 9).
    Using the Class is:
    1.AcroExch.App
    2.AcroExch.AVDoc
    3.AcroExch.pdDoc
    4.Acrobat.CAcroApp
    namespace is:
    using AxAcroPDFLib;
    using AFORMAUTLib;
    using Acrobat;
    Using DLL is:
    1. Interop.Acrobat
    2. Interop.AcroPDFLib
    3. Interop.AFORMAUTLib
    4. AxInterop.AcroPDFLib
    My problem is,
    I am Working in
                       PDFis open inside the adobe reader/Viewer, but i can not able to get the value from PDF Forms.
                        ( This Pdf forms is Some more Control Design is Available)
    Ex:
    I have Attached my Pdf  disgn file.        Please see this Pdf file.
    I am not able to get the value from  inside window(adobe Reader/Viewer),  but i can able to get the value from the out side of adobe viewer/Reader.
    This coding not working properly,
    try
                    CAcroAVDoc AcroExchAVDoc = default(CAcroAVDoc);
                    CAcroApp AcroExchApp = default(CAcroApp);
                    CAcroPDDoc oDoc = default(CAcroPDDoc);
                    AFORMAUTLib.AFormApp AFormAut = default(AFORMAUTLib.AFormApp);
                    AFORMAUTLib.Field Field = default(AFORMAUTLib.Field);
                    AFORMAUTLib.Fields Fields = default(AFORMAUTLib.Fields);
                    bool OK = false;
                    AcroExchApp = new AcroApp();
                    oDoc = new AcroPDDoc();
                    AcroExchAVDoc = new AcroAVDoc();
                    AFormAut = new AFormAppClass();
                    //AcroExchApp = (Acrobat.AcroApp)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.App" ));
                    //oDoc = (Acrobat.AcroPDDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.PD Doc"));
                    //AcroExchAVDoc = (Acrobat.AcroAVDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.AV Doc"));
                    //AFormAut = (AFORMAUTLib.AFormApp)Activator.CreateInstance(Type.GetTypeFromProgID("AFormAut .App"));
                    bool bOK = AcroExchAVDoc.Open(pdfWindowLeft.src, "Temp"); ' some time not true
                        ' if  ok (true) then
                    if (bOK)
                        Fields = (AFORMAUTLib.Fields)AFormAut.Fields;
                        foreach (Field myField in Fields)
                            if (myField.Name == "form1[0].#subform[0].Id[0]")   ' field value not get from the inside window
                                string Id = myField.Value; ' not getting a answare
                            if (myField.Name == "form1[0].#subform[0].PatientName[0]")
                                string PatientName = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Email[0]")
                                string Email = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].PhoneNo[0]")
                                string PhoneNo = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Address[0]")
                                string Address = myField.Value;
                catch (Exception Ex)
                    lbl_Result.Text = Ex.Message;
                finally
                    Conn.Close();
    This coding is working properly,
    try
                    String FORM_NAME = addressLeft.Text;
                    //String FORM_NAME = Application.StartupPath + "\\..\\..\\..\\..\\..\\TestFiles\\SampleForm.pdf";
                    // Initialize Acrobat by cretaing App object.
                    CAcroApp acroApp = new AcroAppClass();
                    // Show Acrobat Viewer
                    acroApp.Show();
                    // Create an AVDoc object
                    CAcroAVDoc avDoc = new AcroAVDocClass();
                    // Open the pdf
                    if (!avDoc.Open(FORM_NAME, ""))
                        lbl_Result.Text = "Cannot open" + FORM_NAME + ".\n";
                        return;
                    // Create a IAFormApp object, so that we can access the form fields in
                    // the open document
                    IAFormApp formApp = new AFormAppClass();
                    // Get the IFields object associated with the form
                    IFields myFields = (IFields)formApp.Fields;
                    // Get the IEnumerator object for myFields
                    IEnumerator myEnumerator = myFields.GetEnumerator();
                    bool bFound = false;
                    // Fill the "Name" field with value "John Doe"
                    while (myEnumerator.MoveNext())
                        // Get the IField object
                        IField myField = (IField)myEnumerator.Current;
                        // If the field is "Name", set it's value to "John Doe"
                        // form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].Id[0]")
                            //form1[0].#subform[0].Id[0]
                            bFound = true;
                            lbl_id.Text = myField.Value;
                        //form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].PatientName[0]")
                            bFound = true;
                            lbl_name.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Email[0]")
                            bFound = true;
                            lbl_email.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].PhoneNo[0]")
                            bFound = true;
                            lbl_phoneno.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Address[0]")
                            bFound = true;
                            lbl_address.Text = myField.Value;
    can u anyone help me. It's very urgent for my project.
    Thanks for ur replay,
    Regards
    Ganesaselvam.I

    First off - the code you wrote won't work with Reader, it will only work with Adobe Acrobat.
    Second, LiveCycle Designer-based forms are a special type of PDF and don't use AcroForms, they use an XML-based forms grammar.  Therefore, the AcroForms API calls aren't designed to work with them.  You should be using the JSObject bridge code along with JavaScript to access the values of the fields.

  • How to get the values from xml file to java combo box

    Hi frens,
    I am new to java and xml programming,
    Now, i want to have a code of getting the tag values from the xml file
    into the swing combo box of java front end.
    How can we do that?
    any help of code or tutorial or an ebook is a great help for me.
    Thank you,
    Karthik.
    Edited by: Karthik84 on Aug 27, 2008 1:49 AM
    Edited by: Karthik84 on Aug 27, 2008 11:29 PM

    look at this link
    http://www.stylusstudio.com/docs/v2006/d_help30.html
    I read sometime back that castor has a tool to do
    conversion. You might have a look into casto as well.

Maybe you are looking for