element

python,python-elements and orphan element

Hi, i have a little problem. I must parse an xml file. I use the module "element" : http://code.google.com/p/python-elements/ Sometimes in the XML, an element is orphan but sometimes not : <product /> .... <product>7</product> I created a class Products with product as children : class Products(Elements): _tag = "products" _ch...

Why does facebook have random element IDs ?

I have noticed that facebook has random element IDs for every element - including elements that have no unique element id. <div id="__w2_YvdN1r2_loading">blah</div> Any ideas why they do this on every element & how they do this? ...

Finding correct php regex for this complex element

Hi since hours im trying to get a regex which is able to find the following part in a string. [TABLE|head,border|{ #TEXT|TEXT|TEXT# TEXT|TEXT|TEXT TEXT|TEXT|TEXT TEXT|TEXT|TEXT }] Its from a simple self made WYSIWYG Editor, which gives the possibility to add tables. But the "syntax" for a table should be as simple as the one above. N...

jQuery, get ID of each element in a class using .each?

I'm trying this to get the id of each element in a class but instead its alerting each name of the class separately, so for class="test" its alerting: t, e, s, t... Any advice on how to get the each element id that is part of the class is appreciate as I can't seem to figure this out.. thanks $.each('test', function() { alert(this) }...

jQuery .height() problem with chrome.

I've been using jQuery Height function. But there was a problem in getting the correct height of my div element. This div element's height is set to auto, which means the div's height depends only on the elements inside of it. When I tried using the .height() in my page, I got the following result: Chrome: 1276 px Firefox: 1424 px But...

IE7 - Styling Javascript generated Element

Hello there, It's seems very curious but I'm having problems applying styles for javascript generated elements in IE7 but if I render the same element as string it does work. on my javascript: var style = document.createElement('link'); style.setAttribute('type','text/css'); style.setAttribute('rel', 'stylesheet'); style.se...

finding location of HTML elements with javascript & offsettop

I'm trying to find the location of an element on the screen using javascript. This is what I'm doing. function locateTargets(){ var targets = document.getElementsByTagName("span"); for(var i = 0;i<targets.length;i++){ if(targets[i].className == "target"){ targetsY[targets[i].getAttribute("id")] = targets[i].o...

Make a second element on XSD required when a first element is used

Hi, I have a simple XML file, with 3 basic elements. The first one is required (minOccurs=1) and the second and third are optional. However, if the second element is used, then I would like the make the third one required. He's the XML: <?xml version="1.0" encoding="utf-8" ?> <resultado> <consulta fonte="1" origem="Origem">0</...

R. Zoo. Repeat the first day data through all the day.

Hello I have a zoo series. It lasts 10 years and its frequency is 15min. I'd like to get a new zoo series (or vector) with the same number of elements, whith each element equal to the first element of the day. That's, The first element everyday is repeated throughout the wole day. This is not same as aggregate(originalseries,as.Date,h...

Extending native elements in JavaScript via prototype?

Would you consider extending the native elements via the prototype dangerous? I see some frameworks such as Prototype doing this so I have started to wonder if I dare to do that too. I am worried about implementing things like addClassName and make it collide in the future in a way that I can't resolve any other way than rewriting the ...

Access asp:HiddenField through javascript from target page in anchor tag

Hi, I have a page (startPage.aspx) which transfers control to another page using an anchor tag i.e. (a href="newPage.aspx"). I would like to know how I can access some form element on startPage.aspx from the newPage.aspx in javascript? (eg: document.getElementById, etc). The element I am trying to access is an asp:HiddenField which does...

C# Pattern Matching XML Element Value Libraries / Functions

I am new to C# and am kind of confused what to do after reading some related posts about this topic. I am giving an XML file from another tool. The XML file may not be valid as it may contain illegal characters and could be not well-formed. Unfortunately, the correction of illegal characters won't be done as the XML is generated from ...

Having a page element in-background / below other elements?

I currently have two navigational links (arrows), but they tend to push other elements on the same height (a textarea in this case) away. The picture below illustrates the problem: How do I make it so that the arrows won't interfere with, but exist on the same height as the textarea? I'm left clueless, help is much appreciated :-). ...

Javascript slide element

I want to know what's the best technique to slide an element just like in these examples: http://demos.flesler.com/jquery/localScroll/#section1c But with Pure Javascript so NOT jQuery or any library. Example structure <div id="holder"> <div id="bridge" onclick="slide('content')">Click to slide</div> <div id="content" sty...

CSS2 Pseudo selector for first element of `its kind`?

Hello! Is there a way to do something like this in CSS2 (not 3)? h2:first{bla bla;} Thank you! ...

WPF Element Binding With Dynamically Generated UI Elements

I have a page in which I have a grid with 2 columns, one accommodating 80* width and the other accommodating 20*. Beneath the grid is a stack panel to which I load UI elements (child stack panels) at runtime. My objective is to bind the widths of the stackpanels to the columns of the grid. This works perfectly and the stackpenels resiz...

Should I hide or destroy UI elements?

I was wondering if, whenever I have a situation in which I have to hide some UI element temporarily, it is sufficient to hide it (many frameworks give this option) or I should delete the object in memory and recreate it later when needed again (with the same parameters). What are the pros and cons of each solution? I was thinking that m...

jquery, find next element by class

How can i find the next element by class. i tried with $(obj).next('.class'); but this return only classes in $(obj) parent I need to take the next element anywhere throughout the code by class name. Because my code looks like <table> <tr><td><div class="class">First</div></td></tr> <tr><td><div class="class">Second</div></td></tr> <...

How do I change this function to add the child nodes into the //root/Product/Genres node instead of adding to the end of the file (i.e. after </root>

It works properly in the way that it breaks up the comma-separated values into an array (with explode), but when it adds the child nodes, they show up after the closing root tag. What I'm trying to do here is replace the <Genres>Adventure,Crime,Action</Genres> with <Genre>Adventure</Genre> <Genre>Crime</Genre> <Genre>Action</Genre> A ...

GetElementsByTagName which is not case sensitive?

i'm using GetElementsByTagName to extract an element from an xml. GetElementsByTagName is case sensitive - it throws an exception if the node name is 'PARAMS' instead of 'Params'. i dont want that , can i use a different way in XMLDocument so it wont be case sensitive ? ...