How to assign content of XML to a string in bls
Hi Experts..
Can someone tell , how to take the content of the XML file thats created in the BLS into a string.
Regards
Sreekanth
When i try to assign the XML output to the string it is showing something like Invalid assignment target.. (as it is assigning a file to a string ) wat exactly to be done to get the entire XML content to a string on runtime.
the String should contain the value something like this
outputstring="<b><?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-10-16T13:38:29" EndDate="2007-10-16T13:38:29" StartDate="2007-10-16T12:38:29" Version="11.5.3"><Messages><Message>Command Query Successful</Message></Messages></Rowsets></b>"
Similar Messages
-
How to parse contents from XML file in Java
Hi All,
I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
How to parse Contents of XML file??
Thanks in advance,
Rajendra.Hi All,
I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
How to parse Contents of XML file??
Thanks in advance,
Rajendra. -
How to read content between xml tags?
is there any way to read the content between xml tag
> is there any way to read the content between xml tag
Yes. Are you having some sort of problem? If so, please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
Please post a short, concise, executable example of what you're trying to do. Don't post the actual code you are using (I can't emphasize this strongly enough). Just write a small example that demonstrates the problem, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
Help us help you solve your problem.
~ -
How to read from a xml file(in String format) using a java program
hi friends
i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
thanksfinal DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
final Document document = db.parse(documentStream); -
How to store content of file in a string
Hi All :) ,
i wanted to store all the content of a file say HTML file in a String ,please tell me how should i do that so that all the content from <HTML> to </HTML> copied to the string ..thanks :)ashish.escape wrote:
Is this a right way ?It's not a good way, but I think that it will almost work. To make it work, try using a BufferedReader instead of a DataInputStream (which is deprecated for reading lines), like this:
BufferedReader reader = new BufferedReader( new InputStreamReader( fis ) );
while( (thisLine = reader.readLine() ) != null )
...Don't forget to close the reader after you're done.
There are quite a few things "not good" about this code:
* The exception handling is horrid - you may very well be hiding the real problem - try getting rid of the try/catch and simply declare your main method as 'public static void main(String[] args) throws Exception' - that will exit the application and print the full exception and stack trace to the console. I would make this change and run the application again before doing anything else.
* Use a StringBuffer to append to, concatenating Strings is very slow.
* It's not apparent why you even need to read a line at a time - it looks like you could just read the file into a buffer and append that to the StringBuffer without needing to worry about parsing it a line at a time, unless there is some processing that you're doing on each line that is not shown in this code snippet.
As the first responder said, you should really read the IO tutorial here:
http://java.sun.com/docs/books/tutorial/essential/io/ -
How do i parse an xml with a string?
I got a string (ex. "<testing><testing1>bla</testing1></testing>") and i would like to temparory store in XmlDocument so that i can retrieve the value. I am new in using xml... Can you all pls help? urgent thanks
search this forum, it's been asked and answered a thousand times.
-
How to assign negative values to attribute after calculation in BLS
Hi,
I am having requirement as following
result = (A*B)-C
Here A,B,C are attributes, i am getting these attributes after doing some calculation on some other attributes in Business Logic Services.
possibilities: (A*B) can be greater than C
(A*B) can be equal or less than C
I has to calculate the above result value and I has to plot in spc chart according to that by taking y-axis range as -1000 to 1000 value.
Is there any action block for this or we have to write logic.
Please can anybody help me in resolving above calculation and storing into result along with '+' or '-' sign
Message was edited by:
RAJESH PERLA
Message was edited by:
RAJESH PERLA
Message was edited by:
RAJESH PERLARajesh
I Agreed with Udayan. Though this is not clear wat exactly u want here, i think u need not get confused with (+)ve/(-)ve sign in numbers bcoz in BLS all calculations are self mathematically done with proper result.
Anyway, if it is strictly requirement of assignment for signs to numbers, u may use this expression as <b>-1 * ((A*B)-C)</b> for negative sign, otherwise <b>+1 * ((A*B)-C)</b> for positive sign.
Of course, all attributes must be Number Data Type to be calculated properly, otherwise set that attribute as number with use of built-in function <b>number(attribute)</b>
Regards
Som -
Converting XML Document to String
Dear All,
I am quite new to Java Web Services. I have made a Java Class which calls all the web services . I am displaying the results on a Command prompt. Below is my sample code:
import javax.xml.rpc.Service;
import javax.xml.rpc.Stub;
import horusWS.Horus_x0020_Web_x0020_Services_Impl;
import horusWS.Horus_x0020_Web_x0020_ServicesSoap;
public class JavaClient {
public static void main(String[] args)
Horus_x0020_Web_x0020_Services_Impl service = new Horus_x0020_Web_x0020_Services_Impl();
Horus_x0020_Web_x0020_ServicesSoap port = service.getHorus_x0020_Web_x0020_ServicesSoap();
String str;
str = port.getTextFeedbackLearner(1,"P001",1);
//where getTextFeedbackLearner is the my Web Service.
System.out.println(str);
System.out.println returns the web service in string format. Now I want to compare this string to my actual getTextFeedbackLearner.xml file. But I think I need to convert getTextFeedbackLearner.xml to string first. Please let me know
how can I convert an XML Document to String.
Thanking you in Anticipation.
cheers,
Sunil SabirYou can read the XML document as you read any other file.
Read it into a String variable.
Check java.io.FileReader, java.io.BufferReader, etc. -
Hello,
In Graphical mapping, Could anyone pls tell me in detail about how to achieve One whole xml into one string element. This XML file i want to send to DATABASE.Thi blog might be of some help
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping -
How to assign drop down list in XML form to properties
Hi ALL,
When i was creating <b>Edit form</b> in XML Forms Builder,for <b>Bulletin Board</b> Application, i had to assign two drop down list boxes to properties created under Content Management Configuration > Global Services > Property Metadata. Can any one help me how to ASSIGN it or provide any related documents.
Suitable replies will be rewarded, for sure.
Regards,
ShankarHi Shankar
Please have a look at this document, especially the part about the cookbook. It explains how to add properties in a dropdown list to your XML form.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ee639033-0801-0010-0883-b2c76b18583a
Good Luck!
Barry -
How to read the contents of XML file from my java code
All,
I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
However I want to email to different people other then me. My email addresses are in the XML file.
From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
Thank You,
PadmaIke,
Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
Please help me.
Thank you for your posting.
Padma. -
How to export table contents in xml file format through SQL queries
hi,
i need to export the table data in to xml file format. i got it through the GUI what they given.
i'm using Oracle 10g XE.
but i need to send the table name from Java programs. so, how to call the export commands from programming languages through. is there any sql commands to export the table contents in xml format.
and one more problem is i created each transaction in two tables. for example if we have a transaction 'sales' , that will be saved in db as
sales1 table and sales2 table. here i maintained and ID field in sales1 as PK. and id as FK in sales2.
i get the combined data with this query,
select * from sales1 s1, sales2 s2 where s1.id=s2.id order by s1.id;
it given all the records, but i'm getting two ID fields (one from each table). how to avoid this. here i dont know how many fields will be there in each table. that will be known at runtime only.
the static information is sales1 have one ID field with PK and sales2 will have one ID filed with FK.
i need ur valuable suggestions.
regards
pavan.You can use DBMS_XMLGEN.getXML('your Query') for generating data in tables to XML format and you can use DBMS_XMLGEN.SETROWSETTAG to change the parent element name other wise it will give rowset as well as DBMS_XMLGEN.SETROWTAG for row name.
Check this otherwise XMLELEMENT and XMLFOREST function are also there to convert data in XML format. -
How can I convert the binary file content to XML message
Dear friends,
I poll the binary file from a ftp server but the payload only includes the binary content, no XML structure in the payload, I hope to convert the binary content to a element node within the XML structure, how can I do that? via content conversion?
Thanks and regards,
BeanRead the binary file stream using java I/O standard functions and convert the read stream to Base64 format. Now map this content to one of the field in target XML structure.
You need a java mapping for this.
what is your target system?
Thanks,
Gujjeti.
Hi Gujjeti,
Thanks a lot for your kind help, my target system is R/3.
Can I achieve that with a UDF or a simple way?
Regards,
Bean -
I'm trying to send apps to the ipad.
To use VPP it says the user need to except the inventation.
WHen they try to, they get this error "This invitation to receive assigned content has already been accepted by another apple id"I had this same issue as well.
I ended up calling Apple Support about the issue. After being on the phone for an hour and trying every thing to fix it, we determined that a certificate was messed up and the server had to be set up from scratch again. I had to reinstall the OS on the Mac Mini Server then reinstall the server app. After setting things back up again everything for user VPP enrollment and pushing apps works now.
My server was still in the testing stage so it wasn't a big deal for me to do.
Did you try removing the user from the program under the user account's About tab in profile manager? Or does the user not show that they're actually enrolled? (Mine wasn't showing they were enrolled but gave that error message you stated)
There is a way to remove Profile Manager content from the server using a Terminal command, i'd try to do that before completely re-doing the server. -
Script: chrome://browser/content/tabbrowser.xml:1605
keeps popping up and crashing all pages. it never used to happen and its driving me nuts!! very frustrating indeed.Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
Create a new profile as a test to check if your current profile is causing the problems.
See Basic Troubleshooting: Make a new profile:
*https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files
*http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
Maybe you are looking for
-
Maintenance view on the standard table
Hi, We need to have a maintenance view on the standard XYZ table . Since it is a std table. we would not be able to create a maintenance view since we need an access key. So we have to : 1. Copy the table XYZ into a Z_table. (just the structure alone
-
I keep getting a man popping up on my page. It is a drawing
I go to my yahoo email and when I go to click on anything I get a drawing of a man, with questions. I don't click them on. But then when I went to send a email, there was a strange search box in the message part of email. This is not happening with I
-
When trying to update aps on my iphone4, the screen shows the incorrect login ID and therefore will not allow updating. When I go into settings, then store, the apple ID on the account is the correct one. How can I change the ap screen display to sh
-
Javascript SSN validator...
Hi everyone, I am looking for a javascript which validates the format of SSN If i have to enter SSN in a text field 1.It has to accept only numbers (no characters) 2.It has to add the string '-' automatically when the users entering the SSN 3.It has
-
Help me get videos and movies on my MacBook?