xmlvalue.c 792 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*====================================================================*
  2. *
  3. * struct node const * xmlvalue (struct node const * node);
  4. *
  5. * node.h
  6. *
  7. * search an attribute node for the value node; return the value
  8. * node address;
  9. *
  10. * Motley Tools by Charles Maier;
  11. * Copyright (c) 2001-2006 by Charles Maier Associates;
  12. * Licensed under the Internet Software Consortium License;
  13. *
  14. *--------------------------------------------------------------------*/
  15. #ifndef XMLVALUE_SOURCE
  16. #define XMLVALUE_SOURCE
  17. #include <string.h>
  18. #include "../nodes/node.h"
  19. struct node const * xmlvalue (struct node const * node)
  20. {
  21. if (node)
  22. {
  23. node = node->below;
  24. }
  25. while (node)
  26. {
  27. if (node->type == NODE_VALU)
  28. {
  29. break;
  30. }
  31. node = node->after;
  32. }
  33. return (node);
  34. }
  35. #endif