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 10:12:30 -0700
User-agent: Apple Webmail/0.6

Ok..I changed the method shown earlier to the following
and know that it ought to put each element on its own
line :

buildUseCaseCollection2From: aList [
aList do: [:each | Transcript show: 'Element:' , (each characterData); cr ]
]

==========================
Element:
                Use-Case #1
                Use-Case #2

==========================

Notice the extra line wraps -- one at the beginning and
one at the end.  It seems like my collection is not being
properly setup but I followed the example in the docs
which says that if I do a :

parser document root elementsNamed: 'UseCases'

I ought to get an OrderedCollection with 2 items in it
(in this case).. But I seem to have only 1 item with
both combined..

Here's the updated XML being parsed :

<?xml version="1.0"?>
<!DOCTYPE requirements [
<!ELEMENT requirements (UseCases+)>
<!ELEMENT UseCase     (#PCDATA)>
<!ELEMENT UseCases    (UseCase+)>
]>
<requirements>
        <UseCases>
                <UseCase>Use-Case #1</UseCase>
                <UseCase>Use-Case #2</UseCase>
        </UseCases>
</requirements>

Any ideas on what I'm not understanding?  Thanks!!

--Rick



reply via email to

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