Closed (works as designed)
Project:
Feeds XPath Parser
Version:
7.x-1.0-beta1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
1 Feb 2011 at 18:30 UTC
Updated:
5 Oct 2011 at 04:24 UTC
When I use the option "Select the queries you would like to return raw XML or HTML", the tag included in the XPath query is returned in the result.
For instance, let's take the following example using this XML -
<top>
<item>
<title>Title</title>
<body><p>Body</p></body>
</item>
</top>
When choosing the option above, I can use the following XPath settings and set body to return raw HTML -
context: //item
title: title
body: body
The output of the mapped body field is <body><p>Body</p></body> rather than <p>Body</p>. Is this the correct behavior?
Comments
Comment #1
twistor commentedThis is the correct behavior. To get your desired result try
body/*.Comment #2
erikwebb commentedThanks, this should definitely be in the help text. I don't believe this is standard XPath behavior.
Comment #3
upupax commentedSame problem for me with the 7.x-1.0-beta2 release.
output:
<title>title</title>output: nothing.
I don't think this is the standard behavior.
Comment #4
upupax commentedSHAME ON ME!!
I've confused Debug options with Return raw XML.
So sorry. :(
Comment #5
texas-bronius commentedThanks for posting-- it helped me out. To be clear to anyone else: Debug options intentionally stuff the tag, element, or attribute name into the resultant value of the xpath query. Use the regular xpath you know, not the /* examples above-- just be sure to uncheck Debug on the actual fields captured.