If statment and semi colon questions

This morning i was wondering why if(foo); {do stuff} doesn't through a compiler error. If it doesn't through a compiler error then that leads me to believe that it there is a reason to have a ; after an if statment. Any thoughts?
I did notice that
boolean foo = true;
if (foo);
print("hello")
if(!foo);
print("goodbye");
}prints both hello and goodbye
so I was wondering maybe it could act like a switch statment iwht out the breaks? i dunno. I was going to experiment with it but i got another task. That and I'm lazy and thought i'd ask before going on a wild goose chase
No this has nothing to do with 45 minutes of wasted time I spent this morning wondering why my if statments weren't working.

hmm i never even though about what would happen. Maybe i should go through all my code and double check...But then again, what do we pay the testers for.
I guess they just leave that stuff in there to keep it interesting. I mean come on...who wants their code to work everytime? Think of the industry provided by those things. We have testers, maintence coders, people who rewrite the code, consolutants to look at code they wrote 10 years ago and are the only ones left around to find errors like that. Then the support staff, the helpdesk people. I wonder if those things aren't left in on purpose.
i for one am going to put ; at the end of all my if's and only use one & or | from now on. Just doing my part to keep the economy strong.

Similar Messages

  • Subtitle semi\colon question & subtitles take forever to remove from project

    I have been having problems with two NTSC DVDs. The subtitles would line up perfectly in Subtitle Workshop put upon importing into Encore (CS3) they would lose sync after about 10 minutes or so. Turns out I was looking in the wrong area (at my MPEG files). On a whim I remembered reading somewhere about replacing the ":" in the subs with ";" and it worked fine!
    But I don't know why it worked? I always thought only PAL subtitles needed to be in ";" ??
    I went back to all of the subtitle files I did work with on prior projects and they had ":" as well? Those were NTSC how come they did'nt give me problems?
    On a related note when I had to "remove subtitles" in CS3 it would take about 4-5 minutes before they cleared. It was faster to shut it down and re-open. Is it a CS3 thing? I know Encore 2 did not do that.

    You have it backwards.
    NTSC subtitles must use the semi-colon (
    ;) delimiter because it's drop-frame. PAL timecode is not drop-frame so it always uses the colon (
    :) delimiter.
    I'm guessing you didn't see problems before because either the video wasn't long enough, or you weren't watching as carefully? Hard to say, but Encore (and other DVD authoring apps that support subtitles) has always behaved in this way.
    I'm confused by your related note. You mean to delete a subtitle track takes 4-5 minutes?

  • Colon and Semi Colon - OnScreen Keyboard

    Is there a way to type a colon or semi colon using the iPad Onscreen Keyboard? If not this seems like a pretty serious oversight

    jinksjohnson wrote:
    The point IS, there is NO colon or semi-colon on the ipad keyboard.
    Can anyone explain why this is?
    I suggest you ask Apple to add this using the feedback channel:
    http://www.apple.com/feedback/ipad.html
    When you do so, make sure you specify exactly what kind of text fields in what apps you are referring to, because in the places where people do most of their typing (email subject and text, web browsers, and word processors)  there is no problem finding those characters using the 123 key.

  • EncodeURL - uses semi-colon or question mark in path?

    I am confused about the encodeURL method and how it formats urls when adding the session ID. It was my understanding that the sessionID is added as a path parameter, which means it becomes part of the query string following a "?" in the url, like so:
    www.mydomain.com/servlet/CheckOut?jsessionid=567
    However, the book I'm using (Java 2 Web Developer Certification Study Guide by Sybex), says that a semi-colon is used instead, like so:
    www.mydomain.com/servlet/CheckOut;jsessionid=567
    Which one is it? Or is this entirely server-dependent? Either way the next processing servlet needs to be able to access that ID using getPathInfo().

    encudeURL exactly does what you says
    www.mydomain.com/servlet/CheckOut;jsessionid=567
    I am also using the same book you use, it seems that you are preparing for the exam?
    Regards
    the exam?
    Regards

  • Author metadata separated by semi-colons truncated in file properties and "Get Info"

    I'm using Acrobat Professional 9.0 (CS3) for Mac to edit the metadata for a collection of PDFs to be made available on the web. When I enter the data, I am inputting a list of authors separated by commas, like this: Smith J, Watson C, Brown J. If I click on "Additional metadata", the data I've already entered is transposed into the various XMP fields. And the commas separating the author names are changed to semi-colons. I gather that this happens because XMP wants to separate multiple authors with semi-colons, and Acrobat wants the metadata in XMP fields to match the metadata stored for the file properties. Fine.
    However, if I save such a PDF and then use Get Info on my Mac (OSX 10.4) to look at the file properties, the list of authors is now truncated where the first semi-colon appears. The list is also truncated in Windows XP if I right-click and select properties. The list is also truncated when I look at the file properties in Preview on my Mac, or if I look at file properties using FoxIT, or using Adobe Acrobat Reader 7 or earlier. The only way a site visitor will actually be able to view the full list of authors in a file saved this way is to use Adobe Reader version 8 or later.
    I would like to preserve XMP/Dublin Core/etc metadata in the proper format in the XMP code, but would also like users of standard, popular file viewers to be able to access the full list of authors. Is there a way to do this with Acrobat 9?
    Also, once I've saved a file and the XMP metadata has been altered, Acrobat seems to permanently change the way that the authors are listed in the file properties. I cannot manually change those settings any longer without Acrobat overriding my changes and converting commas to semi-colons, or surrounding the entire list of authors in quotation marks. Is there a way to get around these Acrobat overrides and manually take control of my metadata again?
    Does Windows Vista read the authors list correctly in the file properties if it is separated by semi-colons?
    It seems to me that in an attempt to get XMP metadata working smoothly across the entire CS line, Adobe has jumped the gun somewhat and is now forcing Acrobat users to use "file properties" metadata that is really only fully compatible with Adobe products. Is there a way I can get some backwards compatibility on this?
    Thanks for any suggestions or insight anyone can provide to this vexing issue.
    Phil.

    Bridge has some pretty powerful and helpful features. However, I am unable to figure out how to access the non-XMP "file properties" fields through Bridge, and if I add metadata via Bridge, then I run into the same problem regarding the use of semi-colons to separate authors.
    If I had more time, or a larger set of files I might investigate the use of ExtendScript to import all my metadata from an Excel file (where it already exists) into the PDF file properties and XMP metadata.
    The best solution for my case though appears to be to use Acrobat 9 and to do the double-edit process for each file. I should be able to just cut-and-paste the metadata from the Excel file, and then if I save the Authors list to the end, I can simply paste it once into the XMP field (through the Advanced metadata button) and then return to the regular file properties page and paste it again in there, where Acrobat will add quotes around it.
    Lastly, if anyone else happens to find this post and is looking for similar information, I would recommend searching in the Bridge forum as well as the Acrobat forum.
    Phil.

  • Escaping double quotes and/or semi-colons in connection string

    Can someone show me a working example of a connection string that uses a password that contains a double quote (") and another example that has a password that contains a semi-colon.
    I cannot get this to work and I can't find anything in the documentation.
    Thanks.

    You didn't say what part of the .NET documentation this came from. I tried this with ODP.NET and I was unable to get it to work.
    Did you try it?
    here are the same tests I've been trying. Can someone please provide me with a working example.
              static void Main(string[] args)
                   OracleConnection oc=null;
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=te\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        Console.WriteLine("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc=new OracleConnection("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=\"te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\\\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
              }

  • I configurated mi ipad in spanish and I can't write a semi-colon, because instead of a semi-colon, it writes our letter ñ. How can I write a semi-colon?

    I configurated mi ipad in spanish and I can't write a semi-colon, because instead of a semi-colon, it writes our letter ñ. How can I write a semi-colon?

    Let's synchronize...
    I'm using an iPad 2 running iOS 4.3.2.
    Use Settings > General > Keyboard > International Keyboards > Add New Keyboard > Spanish.
    Touch Spanish > QWERTY-Spanish (Software Keyboard Layout) > Spanish (Hardware Keyboard Layout).
    Are you still with me?
    Go to your application where you want to use the new keyboard and select the keyboard "Español" by touching and holding the key with the globe on it.
    Now, touch and hold the comma.
    What do you see?

  • Semi-colon in URL from WebLogic 7.0

    Hello,
    We're running WebLogic 7.0 SP1 on two Sun Solaris 8 boxes clustered
    together with JDK 1.3.1_04 and all the necessary Sun patches to suite. The
    problem I have is that quite a few of our URLs are hardcoded to have a
    question mark (?) to begin a list of parameters, and then that gets encoded
    to include the SessionID at the end with an ampersand. That was in WebLogic
    5.1, now WebLogic 7.0 uses semi-colons to start the encoded URL, and my URLs
    that begin with a question mark are no longer valid and just comes up with a
    'Page Cannot Be Displayed' browser message. Anybody else experience this
    problem? How do I get around it?
    Many thanks!
    Dustin

    Hello,
    We're running WebLogic 7.0 SP1 on two Sun Solaris 8 boxes clustered
    together with JDK 1.3.1_04 and all the necessary Sun patches to suite. The
    problem I have is that quite a few of our URLs are hardcoded to have a
    question mark (?) to begin a list of parameters, and then that gets encoded
    to include the SessionID at the end with an ampersand. That was in WebLogic
    5.1, now WebLogic 7.0 uses semi-colons to start the encoded URL, and my URLs
    that begin with a question mark are no longer valid and just comes up with a
    'Page Cannot Be Displayed' browser message. Anybody else experience this
    problem? How do I get around it?
    Many thanks!
    Dustin

  • SQLPLUS script execution vs semi-colon

    Hi everyone,
    is there a way to configure sqlplus such that when a statement (e.g. an INSERT) do not have a semi-colon at the end (or et / on the beginning of the next line) an error is returned?
    Here is an example:
    INSERT INTO emp (emp_no, emp_name) values (5, 'john')
    INSERT INTO emp_status (emp_no, status) values (5, 'full time');
    Running a script containing these two lines with sqlplus won't do the first insert and won't give an error.
    By default these human errors are treated silently by sqlplus.
    I am almost sure there is no mean to detect that but in case I am wrong, I ask the question.
    Best regards.
    Carl

    Hi, Carl,
    plhtyuk wrote:
    Hi everyone,
    is there a way to configure sqlplus such that when a statement (e.g. an INSERT) do not have a semi-colon at the end (or et / on the beginning of the next line) an error is returned?
    SET   SQLBLANKLINES  ONtells SQL*Plus that a single SQL statement can include lines that contain nothing but whitespace, or are completely empty.
    Here is an example:
    INSERT INTO emp (emp_no, emp_name) values (5, 'john')
    INSERT INTO emp_status (emp_no, status) values (5, 'full time');
    Running a script containing these two lines with sqlplus won't do the first insert and won't give an error.If SQLBLANKLINES is ON, then SQL*Plus will think all 3 lines above are part of the same SQL statement, and you'll get a syntax error. Neither INSERT will be done.
    By default these human errors are treated silently by sqlplus.
    I am almost sure there is no mean to detect that but in case I am wrong, I ask the question.There ought to be a more straightforward way to request warnings when you forget a ;. If it was up to me, I would have made that the default behavior.

  • Combine Several Statements.. semi-colon?  "go"?

    I'm using Hyperion Interactive Reporting (a reporting tool), and need to be able to send a very long multi-step SQL statement to Oracle 10g that contains several 'create table x as select y from..' statements, 'create index' statements, etc., then eventually returns one recordset (select * from finaltable).
    Currently a DBA runs all the various steps one by one, then provides the user with the end result in the form of a text file. We would like to make this self serve with parameterized queries.
    My question is, how do I run several different sql statements in one call? I don't have permission to create stored procedures. In MSSQL, I would place a "go" command between each statement. I've tried that, semi-colons, and a lot of other things, and it hasn't worked yet.
    Thanks.

    As this is Oracle and not MS SQL Server, you don't need to create temporary tables, just write a select statement possibly using WITH or sub-query factoring.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9758

  • Semi Colon issues

    What is wrong with my Semi Colon? I'm getting an error 102 around the ; but if I take it out,
    I'm getting the error that I need a colon. The colon is right before the WITH statement.  The Select statement looks correct.  Please help, I'm a newbie.
    Select * INTO TradesMoxyImport
    From
    ;WITH ClientsTable AS (SELECT ClientID, Autex
    FROM Clients
    WHERE (ActiveAcct = 'Active') AND (Directed = 'no') AND (Taxable LIKE '%' + '%')), AxysPal AS
    (SELECT Autex, Quantity, PctAssets
    FROM AxysPals
    WHERE (SecType = 'csus') AND (Ticker = 'ace'))
    SELECT ClientsTable_1.Autex, ClientsOnePercent.SortOrder, CASE WHEN ROUND(ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52,
    0) > ISNULL(AxysPal_1.Quantity, 0) THEN ROUND(ClientsOnePercent.PctEqty * ROUND(AxysAUM.Total, 0) * CONVERT(DECIMAL(3, 2), 5)
    / 100 / 113.52 - ISNULL(AxysPal_1.Quantity, 0), 0) END AS BuyQty, CASE WHEN ROUND(ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5)
    / 100 / 113.52, 0) < ISNULL(AxysPal_1.Quantity, 0) THEN ROUND(ISNULL(AxysPal_1.Quantity, 0)
    - ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52, 0) END AS SellQty
    FROM ClientsOnePercent INNER JOIN
    ClientsTable AS ClientsTable_1 ON ClientsOnePercent.ClientID = ClientsTable_1.ClientID INNER JOIN
    AxysAUM ON ClientsTable_1.Autex = AxysAUM.Autex LEFT OUTER JOIN
    AxysPal AS AxysPal_1 ON ClientsOnePercent.Autex = AxysPal_1.Autex
    WHERE (ClientsOnePercent.OnePctGroupID = 1) AND (ClientsOnePercent.BuyRule IS NULL) AND (ClientsOnePercent.SellRule IS NULL)
    ORDER BY ClientsOnePercent.SortOrder
    pvong

    Hunchback,
    Thanks so much.  This fixed it.  I can not believe I screwed that up.  I am learning.  One last question, what if the table already existed and I just want to add this to the existing table?  How would I do the Insert Into?
    I tried the following and got an error.  I made sure to take out the INTO TradesMoxyImport in the middle of your answer and it didn't work.
    All the columns are set up to match the Select statement.
    Insert INTO TradesMoxyImports;WITH ClientsTable
    AS (SELECT ClientID,
    Autex
    FROM Clients
    WHERE ( ActiveAcct = 'Active' )
    AND ( Directed = 'no' )
    AND ( Taxable LIKE '%' + '%' )),
    AxysPal
    AS (SELECT Autex,
    Quantity,
    PctAssets
    FROM AxysPals
    WHERE ( SecType = 'csus' )
    AND ( Ticker = 'ace' ))
    SELECT ClientsTable_1.Autex,
    ClientsOnePercent.SortOrder,
    CASE
    WHEN Round(ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52, 0) > Isnull(AxysPal_1.Quantity, 0) THEN Round(ClientsOnePercent.PctEqty * Round(AxysAUM.Total, 0) * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52 - Isnull(AxysPal_1.Quantity, 0), 0)
    END AS BuyQty,
    CASE
    WHEN Round(ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52, 0) < Isnull(AxysPal_1.Quantity, 0) THEN Round(Isnull(AxysPal_1.Quantity, 0) - ClientsOnePercent.PctEqty * AxysAUM.Total * CONVERT(DECIMAL(3, 2), 5) / 100 / 113.52, 0)
    END AS SellQty
    FROM ClientsOnePercent
    INNER JOIN ClientsTable AS ClientsTable_1
    ON ClientsOnePercent.ClientID = ClientsTable_1.ClientID
    INNER JOIN AxysAUM
    ON ClientsTable_1.Autex = AxysAUM.Autex
    LEFT OUTER JOIN AxysPal AS AxysPal_1
    ON ClientsOnePercent.Autex = AxysPal_1.Autex
    WHERE ( ClientsOnePercent.OnePctGroupID = 1 )
    AND ( ClientsOnePercent.BuyRule IS NULL )
    AND ( ClientsOnePercent.SellRule IS NULL )
    ORDER BY ClientsOnePercent.SortOrder
    pvong

  • Multiple Artist, Genre... Separator (Semi-Colon) instead of Smart Playlists

    In my opinion, one of the greatest features of ID3 tags is the ability to use semi-colons to differentiate between multiple artists, genres, albums, etc... for any given field. This feature has been available since ID3 tags for MP3's were first implemented over a decade ago.
    With Windows Media Player 10, it's database was finally able to parse the information separated by semi-colons correctly. What this means is that if I have a song like "Picture" by Sheryl Crow and Kid Rock, in the ID3 tag, I type "Sheryl Crow; Kid Rock", and in WMP, if I click on Artist | Sheryl Crow, "Picture" appears. And if I click on Artist | Kid Rock, "Picture" appears. In fact, when I rip songs using WMP, it places semi-colons in numerous ID3 fields from the album description.
    In iTunes, however, when I import a song with a semi-colon in an ID3 tag field, the database reads the artist as "Sheryl Crow; Kid Rock", or essentially, it treats "Sheryl Crow; Kid Rock" as a THIRD artist. The same is true if I have a song that I feel crosses two genres--like "Picture". In WMP, if I put in the Genre field "Pop; Country", when I choose Genres | Pop, "Picture" appears, and when I choose Genres | Country, "Picture" appears.
    Does anyone know if a bug fix for this is in the works for iTunes? It seems Apple and iTunes have been trying to push Smart Playlists for this kind of organization, but that's the poor man's way of organizing songs and not nearly as efficient. I don't want to have to create Smart Playlist for all songs with "Sheryl Crow" in the artist field. It should be inherent based on the semi-colon.
    Does anyone know if anything smarter than Smart Playlists is in the works that matches the intuitiveness of Windows Media Player's database?
    Thanks,
    Bill

    Whereas in WMP & the ID3 spec. you would use a semi-colon to separate items you will find that iTunes & the Music store use a slash instead. However as you so rightly say iTunes takes the information and construes a new artist entity rather than two artists connected to the same track. (WMP might also respond to slash - I recall AC/DC always presenting issues so they exist as AC-DC in my library.)
    If you'd like to make feature request go to: iTunes Feedback.
    Working on the assumption that such ideas are unlikely to implemented any time soon however you might like to see my post on Grouping Tracks Into Albums which covers workarounds for this & other quirks.
    tt2

  • How to save an excel file as CSV with semi-colon as data separator?

    We are creating a flat data file to load the flat file data to our BW system with Excel.  When we save the file, there are three kinds of CSV types for selecting from the "Save as type" list box:
    CSV (Comma delimited)
    CSV (Macintosh)
    CSV (MS-DOS)
    There is no CSV (semi colon delimited) type.  If we pick CSV (Comma delimted) as the type, then when clicking the "Preview ..." picture icon under the "DataSource/Trans. Structure" tab of the InfoSource for this flat file (with the CSV radio button checked the Data separator default is ";"), the File Upload Preview window shows the data is messed up that some columns of the excel flat file are combined into one column.
    Since the save type we picked is "CSV (Comma delimited)", then we try to change the default Data separator from ";" to "," in the preview selection screen, but still not helpful!
    How to resolve the above problem?
    Thanks

    Hi Kevin,
    This "," is defined in your windows setting. If you want to have ";" as separator then go to control Panel, select Regional Options, go to Numbers Tab and define the List separator as ";". After that when you will save your excel file as CSV(MS-DOS) it will have ";" as separator. This will make sure that the amounts are not broken in to two different fields while loading.
    Else if you keep "," as separator then you can also go into the Excel and define all number fields as Number without thousand separator.
    Let me know if you have any doubts in this.
    Regards,
    Rohit

  • Problem with SAX parser - entity must finish with a semi-colon

    Hi,
    I'm pretty new to the complexities of using SAXParserFactory and its cousins of XMLReaderAdapter, HTMLBuilder, HTMLDocument, entity resolvers and the like, so wondered if perhaps someone could give me a hand with this problem.
    In a nutshell, my code is really nothing more than a glorified HTML parser - a web page editor, if you like. I read in an HTML file (only one that my software has created in the first place), parse it, then produce a Swing representation of the various tags I've parsed from the page and display this on a canvas. So, for instance, I would convert a simple <TABLE> of three rows and one column, via an HTMLTableElement, into a Swing JPanel containing three JLabels, suitably laid out.
    I then allow the user to amend the values of the various HTML attributes, and I then write the HTML representation back to the web page.
    It works reasonably well, albeit a bit heavy on resources. Here's a summary of the code for parsing an HTML file:
          htmlBuilder = new HTMLBuilder();
    parserFactory = SAXParserFactory.newInstance();
    parserFactory.setValidating(false);
    parserFactory.setNamespaceAware(true);
    FileInputStream fileInputStream = new FileInputStream(htmlFile);
    InputSource inputSource = new InputSource(fileInputStream);
    DoctypeChangerStream changer = new DoctypeChangerStream(inputSource.getByteStream());
    changer.setGenerator(
       new DoctypeGenerator()
          public Doctype generate(Doctype old)
             return new DoctypeImpl
             old.getRootElement(),
                              old.getPublicId(),
                              old.getSystemId(),
             old.getInternalSubset()
          resolver = new TSLLocalEntityResolver("-//W3C//DTD XHTML 1.0 Transitional//EN", "xhtml1-transitional.dtd");
          readerAdapter = new XMLReaderAdapter(parserFactory.newSAXParser().getXMLReader());
          readerAdapter.setDocumentHandler(htmlBuilder);
          readerAdapter.setEntityResolver(resolver);
          readerAdapter.parse(inputSource);
          htmlDocument = htmlBuilder.getHTMLDocument();
          htmlBody = (HTMLBodyElement)htmlDocument.getBody();
          traversal = (DocumentTraversal)htmlDocument;
          walker = traversal.createTreeWalker(htmlBody,NodeFilter.SHOW_ELEMENT, null, true);
          rootNode = new DefaultMutableTreeNode(new WidgetTreeRootNode(htmlFile));
          createNodes(walker); However, I'm having a problem parsing a piece of HTML for a streaming video widget. The key part of this HTML is as follows:
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                  id="client"
            width="100%"
            height="100%"
                  codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                  <param name="movie" value="client.swf?user=lkcl&stream=stream2&streamtype=live&server=rtmp://192.168.250.206/oflaDemo" />
             etc....You will see that the <param> tag in the HTML has a value attribute which is a URL plus three URL parameters - looks absolutely standard, and in fact works absolutely correctly in a browser. However, when my readerAdapter.parse() method gets to this point, it throws an exception saying that there should be a semi-colon after the entity 'stream'. I can see whats happening - basically the SAXParser thinks that the ampersand marks the start of a new entity. When it finds '&stream' it expects it to finish with a semi-colon (e.g. much like and other such HTML characters). The only way I can get the parser past this point is to encode all the relevant ampersands to %26 -- but then the web page stops working ! Aaargh....
    Can someone explain what my options are for getting around this problem ? Some property I can set on the parser ? A different DTD ? Not to use SAX at all ? Override the parser's exception handler ? A completely different approach ?!
    Could you provide a simple example to explain what you mean ?
    Thanks in anticipation !

    You probably don't have the ampersands in your "value" attribute escaped properly. It should look like this:
    value="client.swf?user=lkcl&stream=...{code}
    Most HTML processors (i.e. browsers) will overlook that omission, because almost nobody does it right when they are generating HTML by hand, but XML processors won't.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to separate a field separated by semi colons

    Hi - thought I would give this a try - any help is appreciated.
    I have a field separated by semi colons - for example - prod1;prod2;prod3
    In a cross tab I'm trying to show which products have a date in them and put an X there. My problem is if the field is like my example - it only shows once and instead of listing each single product as a product - it shows it as one like the example.
    I would like to have a column for each product with and X under each.
    I hope this is enough information.
    Any help is much appreciated.
    Thanks.
    Bill

    Marlene,
    It all just depends on what you are trying to do. If you have a set number values in the string and you want each of them in their own column then it fairly easy...
    SPLIT ({Command.jce_cest}, ";") [1]
    SPLIT ({Command.jce_cest}, ";") [2]
    SPLIT ({Command.jce_cest}, ";") [3]
    SPLIT ({Command.jce_cest}, ";") [4]
    HTH,
    Jason

Maybe you are looking for

  • PowerMac G5 (quad) vs Intel Macs?

    Hello what would be better? The PowerMac G5 (quad powerpc 2.5ghz) or Intel Mac mini or Intel iMac. i don't have enough money for a Mac pro, so that's out of the question, but on ebay, the Powermac G5's (with quad processors) are about the same pice a

  • Stop all Message delivery until start-up class executes

              On fail-over, I need to be able to keep any messages from topics/queues from being           sent to the destinations until a start-up class has been executed and initialized           the application. The problem is that the mdb's get depl

  • Doubt in simple plsql coding

    good evening every one, i am new to plsql can anyone verify my coding what is wrong in my coding...... declare countr varchar2(2); countr := &country varchar(2); cc varchar(3); l_en varchar(50); ab nvarchar2(50); begin select countrycode.rrl,langname

  • Huey Pro and Win7 color profil - W700

    Hi, I have a w700 with Win7 business and Huey Pro 1.24. If I calibrate the screen all works perfectly. The problem is I use the Huey profil by default for my build in screen on Win7 color management, the red are not red on Win7 image viewer or Photos

  • Unable to start Oracle SQL Developer

    I downloaded 64 bit SQL Developer (.zip file). Per instructions, I unzipped and launched the sqldeveloper.exe. First time, I launched, I was asked to enter the full path for java.exe which I did. I downloaded jkd1.6.0_29. After providing the path to