Loading ...
Sorry, an error occurred while loading the content.

xml idea extract

Expand Messages
  • Manuel123
    Here is a xml idea. How can I extract to new document the name of people who is list notetab from this txt file. It s possible that clip question me which
    Message 1 of 5 , Jan 11, 2003
    • 0 Attachment
      Here is a xml idea. How can I extract to new document the name of
      people who is list notetab from this txt file.

      It's possible that clip question me which label I want to extract.
      Each <friend>...</friend> is a register for me. Thanks in advanced.

      friends.txt
      <friend>
      <name>Jody</name>
      <list>notetab</list>
      </friend>

      <friend>
      <name>Manuel</name>
      <list>clip</list>
      </friend>
      ---
      Cursos para ciegos
      Windows,Iexplorer,Outlook,Html,Word,Excel,Access
      ALTAS/BAJAS avisarte cursos en http://www.solotxt.com
    • Alan C.
      Hi Manuel123, If your text is consistently formatted on lines like it is down below the clip then this next clip will work/works. The clip uses the jump lines
      Message 2 of 5 , Jan 11, 2003
      • 0 Attachment
        Hi Manuel123,

        If your text is consistently formatted on lines like it is down below the clip then this next clip will work/works. The clip uses the jump lines clip command which was quick to assemble--there alternatively can be other, more elaborate, ways to get your desired data extracted.

        Perhaps someone else can help you with the wizards. Actually, meanwhile, you could just make a copy of this entire clip then, on the copied clip, name the header (as example) H="list_clip_xml_parse"

        and also alter these next two lines from

        ^!Set %collection%=list notetab^p^p
        ^!IfSame "^$GetSelection$" "<list>notetab</list>" make

        change the notetab in them to clip

        ^!Set %collection%=list clip^p^p
        ^!IfSame "^$GetSelection$" "<list>clip</list>" make

        With those three changes ie header and two lines altered, you'd then also have a clip to parse a different list ie list_clip_xml_parse

        H="list_ntab_xml_parse"
        ^!SetScreenUpdate OFF
        ^!Jump DOC_START
        ^!Set %collection%=list notetab^p^p
        :next_item
        ^!Find "<friend>" IST
        ^!IfError publish
        ^!Jump +2
        ^!Select EOL
        ^!IfSame "^$GetSelection$" "<list>notetab</list>" make
        ^!Goto next_item

        :make
        ^!Jump -1
        ^!Set %gotline%=^$GetLine$^%NL%
        ^!Append %collection%=^%gotline%
        ^!Jump +2
        ^!Goto next_item

        :publish
        ^!Menu File/New
        ^!InsertText ^%collection%
        ^!Replace "<name>" >> "^%EMPTY%" AWIS
        ^!Replace "</name>" >> "^%EMPTY%" AWIS
        ^!ClearVariable %collection%
        ; ---end clip---

        Each <friend>... is
        <name>Steve</name>
        <list>notetab</list>
        </friend>

        <friend>
        <name>Jody</name>
        <list>notetab</list>
        </friend>

        <friend>
        <name>Manuel</name>
        <list>clip</list>
        </friend>

        <friend>
        <name>Ralph</name>
        <list>notetab</list>
        </friend>

        --
        Alan.
      Your message has been successfully submitted and would be delivered to recipients shortly.