Separating character and number within the string

I want to separate the character and the number within one string.
For example,
12345ABCD (the numbers and character may differ in lengths)
I want to separate into two different string of 12435 and ABCD.
Your help would be greatly appreciated.
Thanks!

here is an example:
sample_separator.sql
declare
  i        number := 0;
  j        number := 0;
  x        number := 0;
  vBasis   Varchar2(40) := '12345ABCD';
  vString1 Varchar2(40);
  vString2 Varchar2(40);
begin
  for x in 1 .. length(vBasis) loop
    for i in 0 .. 9 loop
      if substr(vBasis,x,1) = to_char(i) then     
        vString1 := vString1 || substr(vBasis,x,1);
      end if;
    end loop;
    for j in 65 .. 90 loop
      if substr(vBasis,x,1) = chr(j) then
        vString2 := vString2 || substr(vBasis,x,1);
      end if;
    end loop;   
  end loop;
  dbms_output.put_line('vString1: '||vString1);
  dbms_output.put_line('vString2: '||vString2);
end;
/when run:
SQL> @r:\sample_separator.sql;
vString1: 12345
vString2: ABCD
PL/SQL procedure successfully completed.
SQL> hope this helps.

Similar Messages

  • How can if find the most repeated character and number ???

    Hi,
    I have a question. For instance, if we have a text file which contains:
    aaabbbhhhhhhtttttsjs12366
    How can i find the most repeated character and number. I have to add this code to the following program:
    I will aprreciate if you can help.
    Regards,
    Serkan
    import java.io.*;
    public class LineLen {
         public static void main(String args[]) throws Throwable {
              final String filename = "deneme1.txt";
              BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
              String line = infile.readLine();
              int linenum = 0;
              while (line != null) {
                   int len = line.length();
                   linenum++;
                   System.out.print(linenum + "\t");
                   for (int i = 0; i<len; i++)
                   System.out.print("*");
                   System.out.println("");
                   line = infile.readLine();
    }

    For a small alphabet like English, array migt be used:
    //in a for loop
    ++array[s.charAt(i)];For a big alphabet like chinese, HashMap might be barely used:
    map.put(s.charAt(i), increment(map.get(s.charAt(i))));
    // increment is a user defined method, possibly for an Integer object,
    // that returns a new Integer object

  • Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

    Hi
    I am trying to process an X12 message and I am getting following error.
    Method : ProcessMessage
    Message : Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    Parameter name: length
       at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
       at Q.Inbound.X12Preprocessor.getTranTypeFromFuncCode()
       at Q.Inbound.X12Preprocessor.setProcessType()
       at Q.Inbound.X12Preprocessor.getFuncGroupHeader(StreamReader sr)
       at Q.Inbound.X12Preprocessor.ProcessMessage(X12Definition& docInfo)
    Please help.
    Thanks

    Might try them over here.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cvbgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • XML document structures must start and end within the same entity

    Hi there,
    I'm working with a client/server application and using SaxParser for reading in xml. I get the SaxParserException: XML document structures must start and end within the same entity. I understand what that means, but it isn't applicable! The xml data being used is well-formed. I checked the well-formedness with Stylus Studio to make sure. Here's the data:
    <?xml version='1.0' encoding='UTF-8'?>
    <vcmessage>
         <vcsource>3</vcsource>
         <processevent>16</processevent>
         <shape>
              <llindex>0</llindex>
              <shapetype>9</shapetype>
              <shapeproperties>
                   <shapelocation>
                        <xcoord>54</xcoord>
                        <ycoord>184</ycoord>
                   </shapelocation>
                   <bounds>
                        <width>24</width>
                        <height>24</height>
                   </bounds>
                   <fgcolor>
                        <fgred>0</fgred>
                        <fggreen>0</fggreen>
                        <fgblue>0</fgblue>
                   </fgcolor>
                   <bgcolor>
                        <bgred>255</bgred>
                        <bggreen>255</bggreen>
                        <bgblue>255</bgblue>
                   </bgcolor>
                   <thickness>1</thickness>
                   <isfilled>false</isfilled>
              </shapeproperties>
         </shape>
    </vcmessage>The parser generally stops around the </bgcolor> tag.
    I'm using Eclypse as my IDE. I'm wondering if there's something wrong with it? Or maybe there's something wrong with the class I'm using for reading in the XML? Followng is the class.
    Please advise,
    Alan
    package vcclient;
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    public class XMLDocumentReader extends DefaultHandler
      private VCClient client = null;
      private Writer out;
      private String lineEnd =  System.getProperty("line.separator");
      private boolean haveSourceType = false;
      private boolean haveUserName = false;
      private boolean haveMessage = false;
      private boolean haveProcessEvent = false;
      private boolean haveLinkedListIndex = false;
      private boolean haveOpeningShapePropertiesTag = false;
      private boolean haveShapeType = false;
      private boolean haveOpeningShapeLocationTag = false;
      private boolean haveShapeLocation = false;
      private boolean haveOpeningXCoordTag = false;
      private boolean haveOpeningYCoordTag = false;
      private boolean haveOpeningBoundsTag = false;
      private boolean haveBoundsWidth = false;
      private boolean haveBoundsHeight = false;
      private boolean haveOpeningFGColorTag = false;
      private boolean haveOpeningBGColorTag = false;
      private boolean haveOpeningThicknessTag = false;
      private boolean haveOpeningIsFilledTag = false;
      private boolean haveOpeningImageDataTag = false;
      private boolean haveOpeningTextDataTag = false;
      private boolean haveFGRed = false;
      private boolean haveFGGreen = false;
      private boolean haveFGBlue = false;
      private boolean haveBGRed = false;
      private boolean haveBGGreen = false;
      private boolean haveBGBlue = false;
      private boolean haveThickness = false;
      private boolean haveIsFilled = false;
      private boolean haveImageData = false;
      private boolean haveTextData = false;
      private VCMessage vcmessage = null;
      public XMLDocumentReader(VCClient value)
           client = value;
           vcmessage = new VCMessage();
      public VCMessage getVCMessage()
           return vcmessage;
      public boolean haveSourceType()
         return haveSourceType; 
      public boolean ParseXML(InputStream stream)
         boolean success = false;
         // Use the default (non-validating) parser
        SAXParserFactory factory = SAXParserFactory.newInstance();
        try
             // Set up output stream
            out = new OutputStreamWriter(System.out, "UTF-8");
            // Parse the input
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse( stream, this );
            success = true;
        catch (SAXParseException spe)
            // Error generated by the parser
            System.out.println("\n** Parsing error"
               + ", line " + spe.getLineNumber()
               + ", uri " + spe.getSystemId());
            System.out.println("   " + spe.getMessage() );
            // Unpack the delivered exception to get the exception it contains
            Exception  x = spe;
            if (spe.getException() != null)
                x = spe.getException();
            x.printStackTrace();
            return success;
        catch (SAXException sxe)
             // Error generated by this application
             // (or a parser-initialization error)
             Exception  x = sxe;
             if (sxe.getException() != null)
                 x = sxe.getException();
             x.printStackTrace();
             return success;
        catch (ParserConfigurationException pce)
            // Parser with specified options can't be built
            pce.printStackTrace();
            return success;
        catch (Throwable t)
             t.printStackTrace();
             return success;
        return success;
      public void startDocument()throws SAXException
          emit("<?xml version='1.0' encoding='UTF-8'?>");
          nl();
      public void endDocument()throws SAXException
          try {
              nl();
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      public void startElement(String namespaceURI,
                               String lName, // local name
                               String qName, // qualified name
                               Attributes attrs)throws SAXException
          String eName = lName; // element name
          if (eName.equals(""))
             eName = qName; // namespaceAware = false
          emit("<"+eName);
          if (attrs != null) {
              for (int i = 0; i < attrs.getLength(); i++) {
                  String aName = attrs.getLocalName(i); // Attr name
                  if (aName.equals("")) aName = attrs.getQName(i);
                  emit(" ");
                  emit(aName + "=\"" + attrs.getValue(i) + "\"");
          emit(">");
          if(makeStartTag(eName).equals(Constants.OPENING_SHAPEPROPERTIES))
                haveOpeningShapePropertiesTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_SHAPELOCATION))
              haveOpeningShapeLocationTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BOUNDS))
                haveOpeningBoundsTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_FGCOLOR))
                 haveOpeningFGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGCOLOR))
              haveOpeningBGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGGREEN))
               System.out.println("See BGGreen");
          else if(makeStartTag(eName).equals(Constants.OPENING_BGBLUE))
               System.out.println("See BGBlue");
          else if(makeStartTag(eName).equals(Constants.OPENING_THICKNESS))
              haveOpeningThicknessTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_ISFILLED))
              haveOpeningIsFilledTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_IMAGEDATA))
              haveOpeningImageDataTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_TEXTDATA))
              haveOpeningTextDataTag = true;
      public void endElement(String namespaceURI,
                             String sName, // simple name
                             String qName  // qualified name
                            )throws SAXException
           if(sName.equals("") && !qName.equals(""))
              sName = qName;
              emit("</"+sName+">");
           else
              emit("</"+sName+">");
           if(makeEndTag(sName).equals(Constants.CLOSING_SOURCE_TYPE))
              haveSourceType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_USER))
              haveUserName = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_MESSAGE))
              haveMessage = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_PROCESSEVENT))
               haveProcessEvent = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_LINKEDLISTINDEX))
               haveLinkedListIndex = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPETYPE))
               haveShapeType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPELOCATION))
                haveOpeningShapeLocationTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_WIDTH))
               haveBoundsWidth = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_HEIGHT))
               haveBoundsHeight = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BOUNDS))
                haveOpeningBoundsTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGRED))
               haveFGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGGREEN))
               haveFGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGBLUE))
               haveFGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGCOLOR))
                haveOpeningFGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGRED))
               haveBGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGGREEN))
             haveBGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGBLUE))
               System.out.println("See closing BGBlue");
               haveBGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGCOLOR))
                haveOpeningBGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_THICKNESS))
               System.out.println("XMLDocumentReader: Step2");
                haveOpeningThicknessTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_ISFILLED))
               haveOpeningIsFilledTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_IMAGEDATA))
               haveOpeningImageDataTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_TEXTDATA))
               haveOpeningTextDataTag = false;
      private String makeStartTag(String tag_name)
           String start = "<";
           String end = ">";
           return start.concat(tag_name).concat(end);
      private String makeEndTag(String tag_name)
           String start = "</";
           String end = ">";
           return start.concat(tag_name).concat(end);
      public void characters(char buf[], int offset, int len)throws SAXException
           String s = new String(buf, offset, len);
          if(haveSourceType == false)
               if(vcmessage.getSourceType() == null)
                  try
                    if(s.equals(""))return;
                   int sourcetype = Integer.parseInt(s);
                   vcmessage.setSourceType(sourcetype);                            
                  catch(NumberFormatException nfe){}
          else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE)
            if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveUserName == false)
                 vcmessage.setUserName(s);          
            else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveMessage == false)
               //When the parser encounters interpreted characters like: & or <,
               //then this method gets invoked more than once for the whole message.
               //Therefore, we need to concatonate each portion of the message.  The
               //following method call automatically concatonates.
               vcmessage.concatMessage(s);                    
          else if(vcmessage.getSourceType() == SourceType.WHITEBOARD_SOURCE)
               if(haveProcessEvent == false)
                 try
                   vcmessage.setProcessEvent(Integer.parseInt(s));
                 catch(NumberFormatException nfe){}
               else if(haveLinkedListIndex == false)
                    try
                       vcmessage.setLinkedListIndex(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               else if(haveShapeType == false)
                    try
                       vcmessage.setShapeType(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               if(haveOpeningShapePropertiesTag)
                    if(haveOpeningShapeLocationTag)
                         if(haveOpeningXCoordTag)
                              try
                                vcmessage.setXCoordinate(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveOpeningYCoordTag)
                              try
                                vcmessage.setYCoordinate(Integer.parseInt(s));
                                //reset all flags for ShapeLocation, X and Y coordinates
                                haveOpeningXCoordTag = false;
                                haveOpeningYCoordTag = false;
                                //haveOpeningShapeLocationTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBoundsTag)
                         if(haveBoundsWidth == false)
                              try
                                vcmessage.setBoundsWidth(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveBoundsHeight == false)
                              try
                                vcmessage.setBoundsHeight(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBoundsTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningFGColorTag)
                         if(haveFGRed == false)
                              try
                                vcmessage.setFGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGGreen == false)
                              try
                                vcmessage.setFGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGBlue == false)
                              try
                                vcmessage.setFGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningFGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBGColorTag)
                         if(haveBGRed == false)
                              try
                                vcmessage.setBGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGGreen == false)
                              try
                                vcmessage.setBGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGBlue == false)
                         {   System.out.println("getting BGBlue data");
                              try
                                vcmessage.setBGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningThicknessTag)
                         try
                            vcmessage.setThickness(Integer.parseInt(s));                       
                          catch(NumberFormatException nfe){}
                    else if(haveOpeningIsFilledTag)
                         vcmessage.setIsFilled(s);
                    else if(haveOpeningImageDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setBase64ImageData(s);                    
                    else if(haveOpeningTextDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setTextData(s);
                    //reset
                    haveOpeningShapePropertiesTag = false;
          emit(s);
      //===========================================================
      // Utility Methods ...
      //===========================================================
      // Wrap I/O exceptions in SAX exceptions, to
      // suit handler signature requirements
      private void emit(String s)throws SAXException
          try {
              out.write(s);
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      // Start a new line
      private void nl()throws SAXException
          try {
              out.write(lineEnd);
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      //treat validation errors as fatal
      public void error(SAXParseException e)
      throws SAXParseException
        throw e;
      // dump warnings too
      public void warning(SAXParseException err)
      throws SAXParseException
        System.out.println("** Warning"
            + ", line " + err.getLineNumber()
            + ", uri " + err.getSystemId());
        System.out.println("   " + err.getMessage());
    }

    Just out of curiosity what happens if you append a space to the end of the XML document?

  • Increment a number within a string

    Hi!
    How can I increment a number within a string ?
    This code doesn' t provide the rigth result
    DATA zahl TYPE I.
    DO 10 TIMES.
    zahl = zahl +  1.
    write:/ 'HALLO zahl'.
    ENDDO.

    Hello,
    Change the code like this.
    DATA ZAHL TYPE I.
    DATA: LV_ZAHL(8),
          CHAR(255).
    DO 10 TIMES.
      ZAHL = ZAHL + 1.
      WRITE: ZAHL TO LV_ZAHL.
      CONCATENATE 'HALLO' LV_ZAHL INTO CHAR.
      CONDENSE CHAR NO-GAPS.
      WRITE:/ CHAR."'HALLO'NO-GAP,ZAHL NO-GAP.
    ENDDO.
    Regards,
    Vasanth

  • How do I prevent other Mac users from changing my Airport Extreme Network Name and Password within the Airport Utility?

    How do I prevent other Mac users from changing my Airport Extreme Network Name and Password within the Airport Utility?  My company is using an Airport Extreme in our office now and I want to prevent other employees from messing with the network/settings.  Is there a way to place a password on the settings to allow only the admin to access the network name and password? 

    Hi - you have will have to change the device passwords on all the base stations and then don't give them to anyone except the administrators and tell them not to save them on their computers that use the older versions of the Airport Utility - for the newer versions like the mobile apps, as soon as you enter the pasword it is saved and is visible in the advanced pane along with the network password - so if anyone gets a hold of your iPad or iPhone, they can edit the whole network - I have this same issue with my networks in the office and it is inconvenient but doable - I hope this helps

  • I need a function that will go through and encrypt all the strings

    I want to use one way enryption and need a function that will
    go through and encrypt all the strings in my password column in sql
    server 2003.
    I also need a function that compares a test password string
    is equal to the hash value in the database. Can anyone give me some
    advice in this?

    Apparently it's not as simple as I thought. My first instinct
    was
    update yourtable set password = '#hash(password)#'
    but that will crash
    This is inefficient, but you only have to do it once.
    query1
    select id, password thepassword
    from yourtable
    cfloop query="query1"
    update yourtable
    set password = '#hash(thepassword)#'
    where id = #id#

  • How can i parse the number from the string each time automatic ?

    I have this two lines:
    last_file = fi[fi.Length - 1].FullName;
    string lastFileNumber = last_file.Substring(86, 6);
    In last_file i have: C:\\Users\\chocolade1972\\AppData\\Local\\mws\\My Weather Station\\radar_temp_directory\\radar000142.gif
    So i counted and found that the number in this case 000124 is starting from index 86 and length 6
    But for example on my brother pc the directory is shorter the name is not chocolade1972 so the index is incorrect.
    It's not 86.
    How can i use the Substring to find the correct index every time on any pc that have a differenet directory length ?
    In this case it's working fine on my pc for any image i can get the number no problems. But i want it to work also on other pc's.

    You can use Regex to match the filename you want. 
    Like Giovhan suggested you can first get the filename like:
    string result;
    result = Path.GetFileName(fileName);// in your example result = radar000142// in my regex I assume that a file can have a number of digits between 5 to 7 digits.Regex filenameRegex = new Regex("\d{5,7}");string number = filenameRegex.Match(result).Value;// by that way you can retrieve all numbers between 5 to 7 digits regardless of filename whether contains all 6 digits// or file that may contain 5 or 7 digits // You can play with the Regex code to decrease or increase number of digits by changing the numbers

  • Check if a single Text Item in a cell is bold and then grab the string that is bold

    I have written a script that runs through a table and parses out the information I need to create another table with some added information.
    The last piece that I can't seem to figure out is how to check if some text in a cell is bold and then grab said text to put in the new table.
    I will give a small table demo of what I am try to retrieve.
    Table A.
    Column 1
    Description
    123456
    This is a description (This is a note)
    789123
    This is a description (This is note A) (This is note B) (This is more stuff that isn't needed.
    Table B.
    Column 1
    Column 2
    Note
    1
    123456
    (This is a note)
    2
    789123
    (This is note A) (This is note B)
    I can pull all of the other information across that I am trying to get without any issue.
    I can't seem to figure out how to check the formatting of a TextItem to see if it is bold. I have been able to figure out how to check if a cell has bold text in it. using if ((tItems[counterVar].idata & Constants.FTF_WEIGHT) > 0). This ends up not working well because of a few issues. I was wondering if there is any way to check the formatting of a single character?
    I tried something similar to the following:
    prop_Change = tbl_Description_Cell.GetText(Constants.FTI_CharPropsChange);
    txt_String = tbl_Description_Cell.GetText(Constants.FTI_String);
    if (prop_Change.len > 0)
            if((prop_Change[0].idata & Constants.FTF_WEIGHT) > 0)
                    pOffset = prop_Change[0].offset;
                    for (var tbl_tItems = 0; tbl_tItems < txt_String.len; tbl_tItems++)
                            tOffset = txt_String[tbl_tItems].offset
                            if(tOffset == pOffset)
                                    alert(txt_String[tbl_tItems].sdata);
    Thanks,
    Steven

    Depends on your forms-version. If you are using a web-based version, you could have a look at the Java-bean-editor FRITE, it supports such features.

  • Lifetime and behavior of the String Constant Pool

    If you 'inline' a String constant in Java, I'm aware in the VM spec that it says this String is put in the constant pool.
    What is the lifetime of the constant pool and what is it tied to? Is there one constant pool per Class, per Class instance, or per VM?
    If an instance is GC'd, do it's constants previously moved to the constant pool get destroyed, or do they live on until I create another instance of that Class?
    Thanks, Kevin

    Is the constant pool created at compile time and written into the Class file?Yes.
    Each class has it's own constant pool which contains constant values and references to other classes and fields.
    It is created a compile time.
    A class (definition) is loaded by a classloader at runtime.
    In theory you could have the same class loaded twice by different classloaders and each would have a copy of the class definition.
    As far as I know, a class definition can only be removed from memory by nulling/garbage collecting the classloader that loaded it.
    regards,
    Owen

  • How to pass a XML message as a string and to change the string back to XML

    Hi there,
    in our current application, we have to access a webservice with a message whose XML Schema Definition was provided by the service's provider. But when accessing the webservice's WSDL, it says that the service expects the message part as a string type.
    How can I accomplish to send this structured message (as defined by the .XSD) to the webservice as a string?
    Thanks in advance,

    Michal,
    thanks very much for your help!
    I've managed to correctly serialize a xml into a string with the tips in your blog. However, I've not managed to perform the string -> xml (unserialize) step (I'm using Udo's sugestion).
    The problem is that XI generates a namespace prefix in runtime (it can be ns0, ns1, ns2..., depending on the context), and so I need to reference this namespace into the unserializing XSLT. With XMLSpy, I've managed to correctly transform it using the XPath "//*:my_tag" to the string tag, but this approach didn't work in XI.
    If I try to use just "//my_tag" the transformation concludes successfully, but XI says that the generated XML is not well-formed (probably because it doesn't fits the Schema of the target message, but I'm just guessing here). If I try to use "//:*my_tag", it doesn't even performs the transformation, and gives a "Problem When Testing" error, which says "Transformer configuration exception occurred when loading XSLT ...".
    Any ideas on how to reference namespace prefixes in XSLTs in XI?
    The codes of my XSLT's are below:
    XML to string:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <my_tag>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="/"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </my_tag>
    </xsl:template>
    </xsl:stylesheet>
    String to XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my_prefix="http://my_namespace">
    <xsl:template match="/">
    <xsl:for-each select="//*:my_tag">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Thanks again!

  • Apostrophes And Parenthesis in the string

    Hi Everyone.
    How do you guys handle apostrophes and parenthesis in java?
    I have a solution where the client wants to put apostrophes and parenthesis in the database as part of their strings. ie O'reily (also known as dude)
    Now these apostrophes and parenthesis come from the database into the java program -- will it break my javascript strings manipulation? If so how can i treat it before it breaks the string
    I know for a fact it breaks my javascript.
    For example, I have a javascript method that is populated with variables that come from the database.
    onchange="return DoThisFunction("<%=rs.getString("whatever")%>","<%=rs.getString("whoever")%>");"
    thanks to parenthesis and apostrophes I get javascript alert errors can someone please enlightenme as to how i can fix this problem
    Sincerely and Gratefully Yours,
    Stephen A. Sutherland

    You sound pretty confused dude. This is a Java forum, not a JavaScript forum.
    The apostrophes and parenthesis will not interfere with your Java variables, since the Java code is compiled and not based on simple string-substitution. The situation for parens is identical.

  • Identifying Loads and Stores within the LSU block of OpenSPARC T1

    I am trying to find a signal or a group of signals within the LSU block of the OpenSPARC T1 which will inform me that a new load or store has arrived.
    I'm setting up a counter for each new load and for each new store that I observe, so ideally I want to have two signals, e.g. isLD and isST, that I could create from existing signals to signal the proper increment of my counter.
    The micro-architectural specs are not specific enough and though I have searched through the blocks signals by running simulations and observing wave dumps, I cannot seem to locate what I need.
    I appreciate your help!

    Hello,
    Thanks for your reply. I've read the L1 Dcache part of the OpenSPARC T1 Microarchitecture Specification, however, I still cannot figure out the meaning and function of some signals. I think I have to read other parts of the OpenSPARC T1 Microarchitecture Specification, in order to know more about the meaning of abbreviations in OpenSPARC codes.
    As for my project, my main aim is to be clear about the OpenSparc L1 Dcache. Since members in our group are all newcomers to OpenSparc, our director hopes that we can get some practical technics by reading OpenSparc codes.
    Thanks,
    Li

  • Can I have different font sizes and alignments within the same title?

    Apologies, haven't been able to search through previous discussions as I'm in Madagascar and my internet connection is not adequate today!
    I'm trying to put scrolling credits on a project. I want the list of credits - music, photos, text etc. - then underneath that a nice little thanks paragraph followed by the date and website. I want the paragraph, date and website to be centered, but when I try to do that it centres the whole thing and messes with the format of the credits part. Changing the font size also makes all the text the same, but ideally I need a couple of bits to be different.
    Does that make sense?
    There doesn't seem to be a way to just highlight the bit that I want to change - it's all or nothing. But I know it's been done before, because I've got a video made last year which has this exact thing as the credits. Unfortunately the person who made that isn't here at the moment.
    Any help very much appreciated, this has to be finished within the next few hours and I've been struggling for days. I tried to do it just as several screens of text instead of the scrolling thing, but couldn't format it properly for the credits.
    As a complete aside, I've just downloaded the same song 3 times from iTunes and every time it's dodgy and cuts out after 1/3 of the song. Don't know whether this is to do with my bad internet or what... but any help with that would also be amazing.
    Thanks.

    Not currently possible.
    A computer/catalog is a unique construct.
    An iOS device can only sync to one computer/catalog at a time.
    You can sync many devices to one computer/catalog but not the other way around.

  • Programmatically choosing the dll and function within the dll

    LabVIEW 2013
    I have a top-level UI application, basically a test executive, from which I want to execute external VIs, the tests, that are identified at run-time.  I think that means compiling my test VIs into DLLs and then accessing the test VIs from the DLLs.  The problem I have is that I do not know how to specify the VI to the Call Library Function at run-time.
    Also, since all of this is LabVIEW code, is there an easier way than using the DLLs?  Maybe an llb or packed library?  And how would I use these?

    hartzde wrote:
    [..] The vi will need to be in some compiled form.
    Default VIs include the compiled code.
    Maybe you should also take a look into TestStand.
    That being said, "Plug In" is (as already stated several times) the keyword you have to look for using Example finder, ni.com and even google.com (referring lavag.org and similar sites).
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for

  • I can't get rid of iTunes match

    Hi everyone, I have a rather strange problem with my iTunes match. After having it for about two years my subscription recently expired and I did not renew it. I don't know if I have to defend my decision, but basically what it boils down to is that

  • AF_Modules/XMLAnonymizerBean Question

    All, I have been using the Anonymizer for changing my XML prefix on output and it has been working great. I ran into a problem with the anonymizer and I received the following in the MDT. Error encountered during parsing of RNIF message type RNIF Req

  • PDF document in iBooks changed into JPEG when mailed

    Something odd just happened:  I use iBooks to store my lyrics for songs, and to share with friends when we play music together, I simply email the selected songs to everyone.  Now, for some reason, they are going through as JPEG format rather than PD

  • How Can I Get Videos I've Shot, Onto My PC?

    I've shot several videos I'd like to get onto my PC (iTouch 4th Gen). I read the iTouch .pdf docs, and it doesn't explain it very well. So how do I can I get my iTouch videos from my iTouch to a folder on my PC? Thanks for any help! Dan Kap, Whittier

  • Is it possible to create a "leave colour" effect with imovie? If so how?

    I've been messing around with different exposures, saturations etc. all night and I still haven't been able to figure out how to show a black & white clip with one colour (in this case red) for contrast. Any techies out there who can help me please?