January 22, 2015
On Thursday, 22 January 2015 at 10:14:58 UTC, Suliman wrote:
> Adam, please add more simple docs about your parser on site.

I'll post some ddoc in the next dmd release, now that dmd finally supports some way to automatically escape xml examples.

> Also it would be perfect to create dub, for easier including parser to project.

I don't use dub and don't like its requirements, so I won't do that. Someone else is free to package it though.

But like I just said in the other email, it is just a single file for core functionality so you can just download that and add it to your project as a source file.
January 22, 2015
On Thu, 22 Jan 2015 18:39:25 +0000, Adam D. Ruppe wrote:

> On Thursday, 22 January 2015 at 16:22:14 UTC, ketmar via Digitalmars-d-learn wrote:
>> i miss it in Phobos.
> 
> I'm sure it'd fail the phobos review process though. But since it is an independent file (or it + characterencodings.d for full functionality), it is easy to just download and add to your project anyway.

yes, but that's one more file to download. if it's in Phobos, i can just install dmd and go on writing my k00l skriptz right away. that's why i want it there.

i know that it will hardly happen, but can i dream? ;-)

January 25, 2015
Adam, I understood how to select URLs, but how extract values of
attributes from such selection?

  <a href="/" class="post-tag" title="show questions tagged
'javascript'" rel="somedata">

I need extract data inside rel ("somedata")
January 25, 2015
On Sunday, 25 January 2015 at 21:24:06 UTC, Suliman wrote:
> I need extract data inside rel ("somedata")

string s = element.rel;
January 26, 2015
On Sunday, 25 January 2015 at 22:14:09 UTC, Adam D. Ruppe wrote:
> On Sunday, 25 January 2015 at 21:24:06 UTC, Suliman wrote:
>> I need extract data inside rel ("somedata")
>
> string s = element.rel;

Do you mean something like this?

string s = element.rel;
foreach(row; document.querySelectorAll("a[href]"))
{
	auto data = document.querySelectorAll(s);
	writeln(data);
}
January 26, 2015
On Monday, 26 January 2015 at 17:17:55 UTC, Suliman wrote:
> Do you mean something like this?

I just mean to get the value of the rel="something" attribute, use

element.rel;

assert(element.rel == "something");


The element is the thing you see in the loop and stuff. querySelectorAll returns an array of elements.
January 26, 2015
On Monday, 26 January 2015 at 17:24:23 UTC, Adam D. Ruppe wrote:
> On Monday, 26 January 2015 at 17:17:55 UTC, Suliman wrote:
>> Do you mean something like this?
>
> I just mean to get the value of the rel="something" attribute, use
>
> element.rel;
>
> assert(element.rel == "something");
>
>
> The element is the thing you see in the loop and stuff. querySelectorAll returns an array of elements.

But I need to query all data from this field. I do not know what will be in quotes. I need select this value.
1 2
Next ›   Last »