#767 xmlpeek broken in 0.91alpha2

0.91-alpha2
closed-fixed
Tasks (408)
5
2011-10-18
2011-08-12
Anonymous
No

xmlpeek would return the inner xml of the node found in the property specified. This worked in 0.85 but returns an empty string in 0.91alpha2.
I'm not certain whether this has existed in previous versions or not.

Discussion

  • Ryan Boggs

    Ryan Boggs - 2011-08-14

    Hi, can you please provide a sample that can better illustrate this issue? I believe that this task is working fine for me, as far as I can tell.

    Thanks,
    Ryan

     
  • Dominik Guder

    Dominik Guder - 2011-09-25

    Until you provide a sample for this issue, I would suggest that you try to append "/text()" to your XPath so you should get the inner xml or value.
    Please drop me a note if I'm completely wrong.

     
  • Lee

    Lee - 2011-10-13

    The old behavior of retrieving the full collection of nodes has been broken. The only thing returned now is the text contents of child nodes, not the full node. This has been broken since nant-0.91-alpha1. Example follows.

    test.xml
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <builds>
    <build name="TEST">
    <date>10/13/2011 10:13:07</date>
    <buildNum>126</buildNum>
    <modules>
    <module name="TESTModule">
    <FileVersion>11.0.2002.101</FileVersion>
    <ProductVersion>11.0.2002.101</ProductVersion>
    </module>
    </modules>
    </build>
    </builds>

    QUERY:
    <xmlpeek xpath="//builds" file="${project.versions}" property="xmlnodes"/>

    Expected output:
    <build name="TEST">
    <date>10/13/2011 10:13:07</date>
    <buildNum>126</buildNum>
    <modules>
    <module name="TESTModule">
    <FileVersion>11.0.2002.101</FileVersion>
    <ProductVersion>11.0.2002.101</ProductVersion>
    </module>
    </modules>
    </build>

    ACTUAL output:
    [xmlpeek] Found '1' nodes with the XPath expression '//builds'.
    [echo] xmlnodes: 10/13/2011 10:13:0712611.0.2002.10111.0.2002.101

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-14
    • milestone: --> 0.91-alpha2
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-14

    Hmm, I'll take a look.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-17
    • assigned_to: nobody --> rmboggs
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-17

    This report is actually a duplicate of 3366107. I just realized this.

    However, I just committed an update to XmlPeek to cvs that should address this issue. I was able to successfully test the sample provided by gntleone. The expected output is now the actual output when nant is built from cvs. If possible, please test by building from cvs.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-18

    10-17-2011 Nightly snapshot contains the fix.

     
  • Ryan Boggs

    Ryan Boggs - 2011-10-18
    • status: open --> closed
     
  • Ryan Boggs

    Ryan Boggs - 2011-10-18
    • status: closed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks