html

Reading HTML file to DOM tree using Java

Is there a nice parser/library which is able to read an HTML document into a DOM tree usinf Java? I'd like to use the standard DOM/Xpath API that Java provides. But all libraries I can find only seem have custom APIs to solve this task. Furthermore the conversion HTML to XML-DOM seems unsupported by the most of the available parsers. A...

Best way to strip html tags from a string in sql server?

I've got data in SQL Server 2005 that contains html tags and I'd like to strip all that out, leaving just the text between the tags. Ideally also replacing things like &lt; with <, etc. Is there an easy way to do this or has someone already got some sample sql code? I don't have the ability to add extended stored procs and the like, so...

Tools to reduce generated HTML size

I'm using google docs, and some templates we are using were created using MS-Office. The resulting HTML is fat and ugly, and the 500KB per doc limitation on google makes some cleanup mandatory. I was able to find redundant "style" attributes and move them to some CSS class, and rename the most redundant classes names to shorter ones, whi...

What is the best way to implement 'Excel like column sizing' for an HTML table?

Basically, I want to allow the user to resize columns in an HTML table, using the same method as you would in Excel. Drag the space between columns and size. I did some research on this last year, and found a few hacks and kludges. Most were pretty bad, and I didn't find anything really good. Now, it looks like I need to implement th...

expand collapse html field Firefox

How do I expand/collapse an html field in Firefox? I incorporated a few JavaScript examples from the web, but they only worked in IE. (I'm limited to HTML and JS) Suggestions are appreciated. Thanks. Yes, I would like to show/hide divs and such. ...

PHP sessions with HTML

I have a website which uses PHP and HTML pages, I want to create a session which stores a username from the login page. But the login pages are php and the next pages are html. Is this a problem or can I just add a small statement of php into the html page saying <?PHP session_start(); $_session['loginid']=$_post['username']; ?> Or ...

Reading and editing HTML in .Net

Is there a .Net class for reading and manipulating html other than System.Windows.Forms.HtmlDocument. If not, are there any open source libraries for this. ...

CSS for the "down arrow" on a <select> element?

Is it possible to stylize the down arrow on a drop down select element? i.e., (-->) I suspect the answer is no because of the way IE handles that particular element. If there isn't a way, does anyone know of a 'fake' drop down box using javaScript that would mimic that behavior but give me the ability to customize? ...

What are standards for characters allowed in text fields

What are the typical characters allowed in text fields in a new user sign-up? Are there www standards? Especially interested in Username and Password character types allowed. ...

Correct indentation of HTML and PHP using Vim

I've been using Vim for a while, and I can't get proper HTML indentation working in PHP files. For example, what I want is for each child to be indented one tab more than it's parent, as shown below. <?php if(isset($sports)) { //Do something ?> <div> <label>Uniform Size</label> <ul> <li class="left"><label for="s" class="small">S<...

BeautifulSoup 3.1 parser breaks far too easily

I was having trouble parsing some dodgy HTML with BeautifulSoup. Turns out that the HTMLParser used in newer versions is less tolerant than the SGMLParser used previously. Does BeautifulSoup have some kind of debug mode? I'm trying to figure out how to stop it borking on some nasty HTML I'm loading from a crabby website: <HTML> <...

HTML/CSS: Table getting out of a cell. Is it normal? How to fix?

I have a table inside a cell, and that table is "getting out" of the cell, as see in this screenshot: I see this on Firefox. Is this "normal". How can I fix this? The code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtm...

Is it possible to "remove" styling from HTML elements?

I'm wondering if it's possible to restore an element's style to it's "default" state, with Javascript or otherwise. I need to do this because I'm inserting HTML into 3rd party web pages and cannot control what styles they attribute to different elements. For instance, they may have: div { margin: 10px; padding: 5px; line-height:...

Browser Caching of CSS files

Quick question regarding CSS and the browser. I tried searching SO and found some similar posts, but nothing definitive. I use one or two CSS files in my web projects. These are referenced in the HEAD of my web pages. Once I hit one of my pages, does the CSS get cached so that it's not re-downloaded with each request? I hope so. Do IE, ...

HTML window object onclose or closing event

Is the window object onclose() or closing() event exposed in HTML/Javascript? ...

What's a quick, easy way to send HTML emails to myself to test them?

I've been given the task of optimizing HTML emails for different email/webmail clients. I used to test the HTML file by doing a trick in Outlook Express, to make it send the raw HTML, but Microsoft seems to have stopped supplying Outlook Express now (I think "Live Mail" is supposed to replace it). So my question is, is there a simple, q...

How to express the content referenced by the anchor tag

I'd like to express in an HTML document what kind of document is pointed by an anchor tag (<a>). For example, is it a list of dates, or a list of people, etc... All referenced documents will be Atom feeds, but the links will be displayed differently based on what the feed contains. I see 2 options : using the "rel" attribute : this at...

Howto open a link in a pdf-file in a new window?

I have a link in a pdf-document (PDF1), which is embedded in a browser instance. Or let's say the Adobe Reader is embedded in a browser window. In this pdf-document (PDF2) is a link to a servlet, which view opens another pdf-file. Now the new pdf-document is opened in a embedded Adobe Reader in the same browser window. How can this doc...

force left (nav) frame when show some pages

I've an old website, navigation in an frame at left, pages at right. I want when an page is url'd directly the nav (left frame) shows also. Until now I was an js working, but I don't know from when it are not working, now returns this message: *Forbidden You don't have permission to access /master.html on this server. Additionally, a ...

ASP.NET Control to HTML tag equivalent

I'm looking for a cheat sheet that will allow me to show an HTML designer the equivalent asp.net controls for standard HTML tags. As an example the <asp:Panel> will render as an HTML <div> and an <asp:Label> will render as an HTML <span>. I've been googling this to no avail. Can someone post a link to a good cheat sheet so that the de...