SGMLXML.net A place for SGML and XML application developers.

March 11, 2005

Return Unqiue Element Content

Filed under: ACL — cangione @ 2:27 pm




Notes:

  • Quick helper function when going after unique elements known to be present in a document.
  • No Error Handeling
  • If there are two of the same element only returns the first

Example:

function return_unique_element_content(elementname){

local status = oid_find_children(oid_null(), $arr, $elementname)

if ($status == 1) {

local elemoid = $arr[1]

local elemcontent = oid_content($arr[1]);

return $elemcontent

}

}

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress