Re: Cannot change A HREF

Magnus Olstad Hansen <[email protected]>
Newsgroups gmane.comp.parsers.htmlparser.user
Message-ID <[email protected]>
I've discovered that my source had a double space before the href 
attribute, like this:

<a  href="...">

Seems the extra space is included with the attribute name, as a 
setAttribute(" " + "href", ...) actually changes the value in my source.
This may be something to classify as a bug? Whitespaces in HTML are 
probably very often incosistent...

Thanks,
Magnus


Magnus Olstad Hansen wrote:
> Hi,
>
> I have trouble changing the content of the HREF attribute of an A-tag. 
> I've tried both TagNode.setAttribute("href", ...) and also 
> TagNode.removeAttribute("href") followed by TagNode.setAttribute("href", 
> ...). But - the href value seems to remain unchanged - any ideas?
>
> Is the new value validated by HTML Parse somehow?
>
> Thanks,
> Magnus
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Htmlparser-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/htmlparser-user
>   


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.