# XML - Select data based on URL string

**URL:** <https://forum.kirupa.com/t/xml-select-data-based-on-url-string/270906>\
**Category:** programming\
**Created:** [September 16, 2008, 2:29am UTC](https://forum.kirupa.com/t/xml-select-data-based-on-url-string/270906 "2008-09-16T02:29:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riot](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@riot](https://forum.kirupa.com/u/riot)\
**Post date:** [September 16, 2008, 2:29am UTC](https://forum.kirupa.com/t/xml-select-data-based-on-url-string/270906/1 "2008-09-16T02:29:53Z")

</div>

My english not is sooo good (but I bet a caipirinha that it’s better than your portuguese) =D

So… a simple AS:

```auto
function loadXML(loaded) {
 titulo = menuXML.childNodes[**[COLOR=red]X[/COLOR]**].attributes.titulo;
 titulo_sub = menuXML.childNodes[**[COLOR=red]X[/COLOR]**].childNodes[**[COLOR=green]Y[/COLOR]**].attributes.titulo;
 titulo_txt.htmlText = titulo +" # "+ titulo_sub;
};
var menuXML:XML = new XML();
menuXML.ignoreWhite = true;
menuXML.load("_xml/menu.xml");
menuXML.onLoad = function(ok) {
 if (ok) {
  loadXML();
 }
};

```

**What I’m trying to do:** get the values for **[COLOR=red]X[/COLOR]** and [COLOR=green] **Y** [/COLOR] from the URL string (_e.g.:_ ?x=0&y=2). I tried several times here but unsucessfully.

Thanks in advance.

[]'s  
Eduardo
