help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] XML usage question..


From: Rick Flower
Subject: Re: [Help-smalltalk] XML usage question..
Date: Tue, 25 Sep 2012 11:29:31 -0700
User-agent: Apple Webmail/0.6

Got it to parse properly now.. Had two issues :

1) hard ^M (carriage returns) at the end of each XML line -- thanks
   Eclipse! -- didn't cause any problems just annoying

2) Got my array of use-case elements using the following code:

(parser document root elementNamed: 'UseCases') elements reject: [:each | each isBlankText]

For whatever reason the array for the returned element has
empty entries in it -- and looks like the following in my
case :

An instance of Array
  contents: [
    [1]:

    [2]: <UseCase>Use-Case #1</UseCase>
    [3]:

    [4]: <UseCase>Use-Case #2</UseCase>
    [5]:

  ]

After running the above reject: code it becomes :
An instance of Array
  contents: [
    [1]: <UseCase>Use-Case #1</UseCase>
    [2]: <UseCase>Use-Case #2</UseCase>
  ]

YMMV!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]