How to get characters between tag
SQL> SELECT id, description
2 FROM mailmessagetest;
ID
DESCRIPTION
1
EXECUTION APPROVAL - <b><VALIDATION TYPE></b> execution <b><VAL. EXE. NO.></b> f
or <b><ENTITY NAME> / <ENTITY NO.></b> has been Sent to you for ApprovalDear All
i want to extract particular some data from description column
this is my expected output..
DESCRIPTION
<VALIDATION TYPE>
<VAL. EXE. NO.>
<ENTITY NAME>
<ENTITY NO.>Can someone suggest me how to do this.
with t
as
select 'EXECUTION APPROVAL - <b><VALIDATION TYPE></b> execution <b><VAL. EXE. NO.></b> f or <b><ENTITY NAME> / <ENTITY NO.></b> has been Sent to you for Approval' str
from dual
select regexp_substr(str,'<[^>]*>',1,level)
from t
where regexp_substr(str,'<[^>]*>',1,level) is not null
and regexp_substr(str,'<[^>]*>',1,level) not in ('<b>','</b>')
connect by level <=length(str)
Similar Messages
-
How to get characters between quotes
Dear All,
Ther is a line in the code
lv_v_report :='abcdef'
I want to get only the characters between the two quotes i.e abcdef.
Can someone suggest me how to do this.
Regards,
Gowtham.2 cases.
1. If we want simply omit quotes.
2. If we want to cut characters between quotes.
P.S. From Your example, I am not 100% sure, that You really want it.
But anyway
SQL>
SQL> with tab1 as
2 (select '''abcdef''' col1 from dual)
3 select replace(col1, ''''),
4 substr(col1,
5 instr(col1, '''') + 1,
6 instr(col1, '''', 1, 2) - instr(col1, '''') - 1)
7 from tab1
8 /
REPLACE(COL1,'''') SUBSTR(COL1,INSTR(COL1,'''')+1
abcdef abcdef
SQL> Regards
Dmytro -
How to get relationship between two views in the reports
How to get relationship between two views in the reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports
Hi,
Please explain your question in detail...what do you want to read ?
If you want to know about the navigation links between the views then you can use APIs like
wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
Iterate through the navigationLinkInfo from above collection and can read the other properties .
I haven't tried the above , but it should work !!!
Regards,Anilkumar -
How to get space between two values in a single cell of a table.
hello,
how to get space between two values in a single cell of a table.
thanks a lot.
kailash.sorry i got the answer.
-
How to get the anchor tag values in next jsp
Hey all,
I have two jsp files.
in first jsp,
I am getting the resultset.
I am setting the resultset to the anchor tag.
below is the code...
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp"><%=rSet.getString(1) %></a></td>
whenever he click on any anchor tag,
It will goes to ACSMasterTwo.jsp page for edit the compleate record.
how to get the anchor tag value in that page...
Please help me on this.You have to pass a parameter. An id is good.
Of course you have to get an id from somewhere in the result set right?
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp?id=<%= rSet.getString("id") %>"><%=rSet.getString(1) %></a></td>Then you call
request.getParameter("id");
and look up the values related to that id in the database. -
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar -
Can anybody tell me how to get connectivity between Personal Oracle 8.0.3 and Developer 2000 Rel 2.1 in Win 98 Environment.
I am able to install either Oracle 8 or Developer 2000 but not both, even if I use different Oracle Homes.
When I posted the same question to www.xperts.com someone wrote to me saying that a patch has to be used to get the connectivity.
I have been trying to solve the problem for last 6 months, but could not do it.
Can you please tell me how to get the connectivity or atleast tell me which version will facilitate connectivity in a stand alone PC.
Thanks and regards,
Ashok
nullFor Windows98. Worked for me, but no guarantee it will solve your problem.
1) Install Dev2K.
2) Install PO8i in a separate Oracle home.
3) Use the following for TNSNAMES.ORA in your DEV2K Home:
# C:\ORAWINKS\NETWORK\ADMIN\TNSNAMES.ORA Configuration File:C:\orawinKS\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle Net8 Assistant
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
MYORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
null -
How to get days between two dates
Hi ,
How to get days between two dates.
Regards,
Ramesh.Hi Ramesh,
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60. -
How to get a specific tag value from SAX parser
I am using the SAX method to parse my xml file.
My Question is how to get the returning characters parsed after calling?
esp the value of <body> tag?
Here is my xml file, and i want to get the parsed <body> value after call sax parser.
<?xml version="1.0" encoding="UTF-8"?>
<article>
<content>
<title>floraaaaa</title>
<date>2004-03-19</date>
<body>
Details of an article, and i want to get the article details
</body>
</content>
</article>here is the parser code I am using:
import java.io.*;
import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
public class test2 {
public String m_xmlDetail;
public void readDetail(String url) {
System.out.println("Parsing XML File: " + url + "\n\n");
try {
XMLReader parser = new SAXParser();
ContentHandler contentHandler = new MyContentHandler();
parser.setContentHandler(contentHandler);
parser.parse(url);
} //try ends here
catch (IOException e) {
System.out.println("Error reading URI: " + e.getMessage());
} //catch ends here
catch (SAXException e) {
System.out.println("Error in parsing: " + e.getMessage());
} //catch ends here
} //function
}//close class
public class MyContentHandler implements ContentHandler {
private Locator locator;
//public String m_bodyDetail=new String();
public void setDocumentLocator(Locator locator) {
System.out.println(" * setDocumentLocator() called");
this.locator = locator;
public void startDocument() throws SAXException {
System.out.println("Parsing begins...");
public void endDocument() throws SAXException {
System.out.println("...Parsing ends.");
public void processingInstruction(String target, String data)throws SAXException {
System.out.println("PI: Target:" + target + " and Data:" + data);
public void startPrefixMapping(String prefix, String uri) {
System.out.println("Mapping starts for prefix " + prefix + " mapped to URI " + uri);
public void endPrefixMapping(String prefix) {
System.out.println("Mapping ends for prefix " + prefix);
public void startElement(String namespaceURI, String localName,String rawName, Attributes atts)throws SAXException {
System.out.print("startElement: " + localName);
if (!namespaceURI.equals("")) {
System.out.println(" in namespace " + namespaceURI + " (" + rawName + ")");
else {
System.out.println(" has no associated namespace");
for (int i=0; i<atts.getLength(); i++)
System.out.println(" Attribute: " + atts.getLocalName(i) +"=" + atts.getValue(i));
public void endElement(String namespaceURI, String localName, String rawName) throws SAXException {
System.out.println("endElement: " + localName + "\n");
public void characters(char[] ch, int start, int end) throws SAXException {
String s = new String(ch, start, end);
System.out.println("characters: " + s);
public void ignorableWhitespace(char[] ch, int start, int end)throws SAXException {
String s = new String(ch, start, end);
System.out.println("ignorableWhitespace: [" + s + "]");
public void skippedEntity(String name) throws SAXException {
System.out.println("Skipping entity " + name);
} //close class -
How to get the; popular tag: back in safari. Deleted it.
How to get the POPULAR tab back in safari after deleting it. Thanks for the help.
You have to pass a parameter. An id is good.
Of course you have to get an id from somewhere in the result set right?
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp?id=<%= rSet.getString("id") %>"><%=rSet.getString(1) %></a></td>Then you call
request.getParameter("id");
and look up the values related to that id in the database. -
How to get diffrence between time
Dear All,
how to get the difference b/w the time.
consider 3 attributes, say initial time,final time and Difference time.
The Data type of those attributes are Timestamps.
Example :
initial time : 8.00 a.m
final time : 1.00 p.m
difference : 5.00 hrs(final time - initial time)
Thanks in advanceThe timestamps have a method .getTime()
This will return the milliseconds since January 1, 1970, 00:00:00 GMT .
So if you do
long diff = finalTime.getTime() - initialTime.getTime();diff will be the difference in milliseconds. Using that, you can calculate how many seconds/hours/days/... it is. -
XML Parsing, how to get a specific tag?
Hello,
I'm new to Flex, am trying to load some data from xml file using httpservice. all is right, but i dont know how to access to a specific tag.
the xml mapping is showed in the picture :
i try to access Device1, dataService.Lastresult.trames.tramdevices[???] somthing like that. sombody knows how to do? thanks a lot. I used xml with java but in flex is a little bit different. thank you for all.Hi neoto,
Have you tried dataService.Lastresult.trames.tramdevices.Device1 ..??
Thanks,
Bhasker -
How to get a sub tag in xml file
As the xml file is the below thing ------
<?xml version="1.0" encoding="UTF-8"?>
<addRequest xmlns:spml="urn:oasis:names:tc:SPML:2:0">
<data>
<attributes>
<attr name="Objectclass">
<value>SafePolicy</value>
</attr>
<attr name="name">
<value>NewPolicy</value>
</attr>
<attr name="Resource">
<value>NewResourceclass</value>
</attr>
<attr name="Description">
<value>This is a New AccessPolicy</value>
</attr>
</attributes>
</data>
</addRequest>
The Schema has only the data and i was able to get the data object and the data can contain any namespace ,so i had the attributes and which inturn contain the attr and value .I have to get the Attributes , so that i can get the attr(name) and value pairs.Initially i did the unmarshal stuff and got until data but giving an error when i try to obtain the other tags .Can any body send the code for obtaining that by using the unmarshalling concept please.I need it .
Thank you,Thank you,
As i was trying to obtain the input to UI from an xml file by which the axis converts to java objects and inturn have to get the reply as xml file . The error was in the jar files ,when i loaded the jar files another time my code started working. -
How to get the XML TAG name itself instead of TAG value
Hi All,
I have a question here
I want to retrieve the XML tag from a XML file instead of its value.
Example:
<item>Colgate</item>
Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
How to do that...?
Thanks
-PraveenYou can do this with an axes XPatch expression:
child::node()/name()
For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
HTH,
Bas -
How to get characters from a line in a file ?
Hello Everybody ,
I am able to read the lines from the file using readLine( ) method.
But i do not want to read anything that comes after the character '#'
Any thing that follows a '#' character is considered as a commet in my case.
The contents of my input file are,
#Character mappings for Japanese Shift-JIS character set
#ASCII character Mapped Shift-JIS character
m 227,128,133 #Half width katakana letter small m
n 227,128,134 #Half width katakana letter small n
o 227,129,129
p 227,129,130
q 227,129,131
r 227,129,132
s 227,129,133
t 227,129,134
u 227,129,135
v 227,129,136
w 227,129,137
x 227,129,138
y 227,129,139
z 227,129,142
My code to read the contents of the file is,
import java.io.*;
class Read
public static void main(String s[])
try{
int i=0,j,l;
BufferedReader in=new BufferedReader(
new InputStreamReader(
new FileInputStream("Character.txt")));
String []str=new String[100];
while(true)
str=in.readLine();
if(str[i]==null) break;
System.out.println(str[i]);
i++;
catch(Exception e)
e.printStackTrace();
System.out.println(e);
How do i store the values within a line in the file
to two different variables
Like say,
I read the line
i get the character 'm' store it in a variable say, char ch='m' ;
and the corresponding value 227,128,133 in a String variable.
String str="227,128,133";
Please offer some suggesstions and help me out .
Any suggesstions would be welcome and very useful.
Thanks and regards
khurramIt depends on whether the format of the file will ever change. If the "rules" regarding the structure of the file are predictable, then it's fairly simple.
In the sample file, if we assume that anything that starts with # should be ignored, and all relevant lines begin with single char, followed by three comma separated integers; then you can just do the following (haven't tested this)
import java.io.*;
class Read
public static void main(String s[])
try{
// Create a Map to store the results..
Map data = new HashMap();
// We will store the actual values in an array
int[] values = null;
// Each valid line has a character
char theChar;
// Temp storage for the integer values
String[] strValues = null;
BufferedReader in=new BufferedReader(
new InputStreamReader(
new FileInputStream("Character.txt")));
String str=null;
while(true)
str=in.readLine();
if(str==null) break;
// trim to remove any spaces
str = str.trim();
theChar = str.charAt(0);
if(theChar != '#') {
// not a comment
// Split to get the int
strValues = str.substring(1, str.length()).split(",");
// We only want the first 3 tokens
values = new int[3];
for(int i = 0; i < values.length; i++) {
values[i] = Integer.parseInt(strValues);
// Now, add the results to the map
data.put(String.valueOf(theChar, values);
System.out.println(str);
catch(Exception e)
e.printStackTrace();
System.out.println(e);
This will leave you with a Map of the character mappings, keyed on the String value of the character (just because you can't store a char in a Map)
Maybe you are looking for
-
Using a 16bit Image in Illustrator poster
I'm making a poster and am used to using 8bit images. The photographer I'm working with insists on using a 16 or 32bit version of his photo in the poster I'm designing. I'm used to laying out designs in Illustrator and then linking a .psd, but since
-
For some reason my property editor window can no longer be seen. When I select View->Property Editor nothing shows. My current window loses focus, but no editor appears. The same happens when I use the shortcut Alt-6. I have the same problem with the
-
How do you ring the system bell?
I've searched the forum archive and can't find the answer to this so here we go: How do you programmatically ring the system bell? An instance where I would like to do this is when you type an invalid character in an input field with a custom Documen
-
Alarm Clock w/ Music Library?
So is there any app or any way to get a playlist to wake me up on my ipod touch rather than the 20 or so annoying pre-loaded sounds? I will connect to external speakers for this, obviously. Thanks
-
Getting ORA-00600, CSS-00152, CSS-00120 When Using csscan
I am getting this error when running CSScan. The solution in metalink says to purge recycle bin. Is this the windows recycle bin or some oracle's internal recycle bin. Purging windows recycle bin did not help. https://metalink.oracle.com/metalink/pls