in

Quark Forums

Skipping empty tags?

Last post 07-03-2009 4:57 AM by elpy zee. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-03-2009 3:31 AM

    Skipping empty tags?

    Good morning :)

     I'm currently working on a rather huge project and need to use XML on it. Well, so far everything seems to work just fine.

    My question is, though, if it is possible to skip empty elements/tags/placeholder?

    Lets pretend my XML looks like this:

    -

     <name>Tom</name>

    <age>22</age>

    <hobby_one>drawing</hobby_one>

    <hobby_two>eating</hobby_two>

    <phone>1234567890</phone>

     --

    Now, I have a second guy in that XML-file, who has only one hobby, so <hobby_two> would be emtpy. But I already use a placeholder for <hobby_two>, so Quark gives me an emtpy line.

    It wouldn't be a problem if it would always be only one empty line, but my list needs about 8 "hobby"-elements and has roughly 300 people in it =(  And the <phone> always needs to be at the end of the list. 

    So, is it possible to tell Quark (7.31) "if you would have an empty line there, ignore it and go on with the next filled element"?

     

    I'd be happy if someone could help me with this =J

    - Christina

     

  • 07-03-2009 4:57 AM In reply to

    Re: Skipping empty tags?

    Is it not possible to strip out the empty lines before the xml gets to Quark? This would be easy to do in Textwrangler or with perl. Only the paragraph return needs to be removed; the tags could be preserved and the return added back later with another search or script, if you need to export and re-use the document.

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems