Question: I upload some video using *Browser-based upload* method. The video is uploaded fine, however I can't manage to fetch this recently uploaded video's id. 
Here's what I did:

```
$vidEntry = new Zend_Gdata_YouTube_VideoEntry();
...
...
$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
$tokenArray = $yt->getFormUploadToken($vidEntry, $tokenHandlerUrl);
$tokenValue = $tokenArray['token'];
$postUrl = $tokenArray['url'];
...
...
posting using cURL...

```

And the problematic code:

```
$state = $vidEntry->getVideoState();
if($state) {
    $video_id = $vidEntry->getVideoId();
} else {
    die("Error");
}

```

And the **$state** here is **NULL**. What's the problem?

BTW according to manual:

> 
> After uploading the video file, the user is redirected to the nexturl
>  specified in your form. If the upload was successful, YouTube appends
>  **id and status parameters to the URL** as shown in the following example:
> 
> 
> 

But I still can't get them (Maybe I'm thinking of the wrong URL?).

Answer: 
You don't have to use DOM, it's just one of the many possibilities. DOM is nice if you need random access to any part of the XML, like when using it to store and use structural data over an extended period of time.

Even then, these days you'll find JAXB to be a much more natural fit. It binds XML structure to Java classes, turning XML documents into instances of those classes for easy use in Java code. Since JAXB was created in the context of web service support you'll probably find good support there.

But I think for your purposes, you could even do with just an XSLT transformation. A stylesheet could be written that outputs simple text based on those elements that describe methods. XSLT in Java is simple to use, there's a default implementation in the Sun JRE and it's highly performant. I'd definitely look into XSLT as your first option.
There is a specialized library called WSDL4J that allows to parse WSDL files.