in reply to How to get empty tag value in XML::XPath

Kumar:

You should make your code smaller in order to make it easier for us to help you. I had started reading through it to see if I could see your error, but I have no idea where in your program you're having problems. In fact, when you do so, you'll frequently find the answer on your own. Isolating the error to a small bit of code is frequently enough of a hint to guide you to the answer.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: How to get empty tag value in XML::XPath

Replies are listed 'Best First'.
Re^2: How to get empty tag value in XML::XPath
by Anonymous Monk on Oct 12, 2011 at 10:27 UTC

    hi,

    I will give you example that may make to understand

    <?xml version="1.0" ?> <data> <server_address port="40">10.0.0.1</server_address> <server_address port="40"></server_address> </data>

    This is my input

    How do I go about fetching the empty port and nonempty attribute from "server_address" element?

      Sorry, but I have no idea in which bit of your code you're having problems, and I'm not particularly inclined to play 20 questions. If you can strip your code down to the bare essentials, and describe your difficulties in adequate detail, I'm sure you can get an answer.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.