Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #16  
Old 08-30-2007, 08:49 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Thank you very much!
Reply With Quote
  #17  
Old 09-04-2007, 12:47 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Another thing appeared-in the last sample transform4.bld,one extra requirement appeared->how can I query only path nodes containing string :
sources/trunk/Exchange ?
(still they should be shown only once )
Reply With Quote
  #18  
Old 09-04-2007, 04:24 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Attached.
Attached Files
File Type: bld transform5.bld (3.3 KB, 1060 views)
Reply With Quote
  #19  
Old 09-05-2007, 08:55 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Thanks.Is there any documentation somewhere about this kind of syntax you use for reading XML nodes?
I would like to avoid to bother you in case some other changes would be needed...
Reply With Quote
  #20  
Old 09-05-2007, 09:18 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
http://www.google.com/search?q=xpath%20reference
Reply With Quote
  #21  
Old 12-02-2009, 08:43 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Hi
I have another issue now,I studied the link u provided and I thought I implemented the XML step correctly but it seems I made a mistake.
I have an XML file contaiing a list of SVN changes.
I need to create a list with all the files changed for a specific string appearing in <msg> -but taken only once (same file should not appear twice)
For example –I need to get a list with all the files changed for F0026703 –therefore I will search all the path nodes having a msg that contains F0026703 and taake them only once:

vbld_TempMacros().Add "NODELIST", msxml.selectNodes("//path[[not(.=preceding::path) and ../../msg[[contains(., '%CURRENT_HB_NUMBER%')]] ]]")

where CURRENT_HB_NUMBER is set to F0026703

This works fine but I have a problem when string to search is F0026704-as it does read only one path :
/branches/ecl/10.X/char/sh/dwh_feed_mappingBBB.sh
And does not read paths /branches/ecl/10.X/char/sh/dwh_acc_settl.sh, /branches/ecl/10.X/char/sh/dwh_trades.sh ,etc –although they appear only in previous logentry for F0026703 –so they should be read as well.
Any idea how to correct the XPath above in order to achieve what I need?

I attached a sample VBP project

XML file looks like this:
<?xml version="1.0"?>
<log>
<logentry
revision="24772">
<author>johnk</author>
<date>2009-11-24T13:20:48.707927Z</date>
<paths>
<path
kind=""
action="M">/branches/ecl/10.X/char/c/ec_feed_liffe_v4.c</path>
<path
kind=""
copyfrom-path="/trunk/char/c/ec_feed_liffe_v5.c"
copyfrom-rev="24755"
action="A">/branches/ecl/10.X/char/c/ec_feed_liffe_v5.c</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/c/ec_feed.c</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/c/ec_feed.h</path>
</paths>
<msg>F0026325: Patch 3331 Merged from trunk, file list:
ec_feed.c 8.36 -&gt; 8.37 F0031033: Changes made to support.
</msg>
</logentry>
<logentry
revision="24835">
<author>maks</author>
<date>2009-11-25T15:07:42.016178Z</date>
<paths>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_acc_settl.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_trades.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_acc_equity.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_contact_master.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_account_master.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_exe_ass.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_accounting_transx.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_nett_posn.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_exe_brok.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_feed_mapping.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_feed_mappingAAA.sh</path>
</paths>
<msg>F0026703: Patch 3256 Merged from trunk, file list:
dwh_acc_equity.sh 9.4 -&gt; 9.5 F0026703 Change BATCH_DIR
</msg>
</logentry>
<logentry
revision="24836">
<author>maks</author>
<date>2009-11-25T16:07:42.016178Z</date>
<paths>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_acc_settl.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_trades.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_acc_equity.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_contact_master.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_account_master.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_exe_ass.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_accounting_transx.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_nett_posn.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_exe_brok.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_feed_mapping.sh</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/sh/dwh_feed_mappingBBB.sh</path>
</paths>
<msg>F0026703,F0026704: Patch 3256 Merged from trunk, file list:
dwh_acc_settl.sh 9.4 -&gt; 9.5 F0026703 Change BATCH_DIR to COMPANY
</msg>
</logentry>
<logentry
revision="24972">
<author>johnk</author>
<date>2009-11-24T19:20:48.707927Z</date>
<paths>
<path
kind=""
copyfrom-path="/trunk/char/c/ec_feed_liffe_v5.c"
copyfrom-rev="24755"
action="A">/branches/ecl/10.X/char/c/ec_feed_liffe_v5.c</path>
<path
kind=""
action="M">/branches/ecl/10.X/char/c/ec_feed.h</path>
</paths>
<msg>F0026325: Patch 1111 Merged from trunk, file list:
ec_feed.h 8.36 -&gt; 8.37 F0026325: Changes made to support.
</msg>
</logentry>
</log>
Attached Files
File Type: bld xmltest.bld (15.1 KB, 1339 views)
Reply With Quote
  #22  
Old 12-02-2009, 10:28 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Finally I solved it,instead of :
vbld_TempMacros().Add "NODELIST", msxml.selectNodes("//path[[not(.=preceding::path) and ../../msg[[contains(., '%CURRENT_HB_NUMBER%')]] ]]")
I use now:
vbld_TempMacros().Add "NODELIST", msxml.selectNodes("//path[[not(.=preceding::path[[../../msg[[contains(., '%CURRENT_HB_NUMBER%')]] ]]) and ../../msg[[contains(., '%CURRENT_HB_NUMBER%')]] ]]")
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 08:04 AM.


Copyright © 1999-2023 Kinook Software, Inc.