Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:57:15+00:00 2026-05-28T07:57:15+00:00

I’m having an issue trying to build an Xpath expression to select all the

  • 0

I’m having an issue trying to build an Xpath expression to select all the “field” nodes “name” value attribute.

I already tried: //field[@name] but it returns no matches.

The sample results I need from the XML document are: currentDate, trulyYours, claimant, dateOfLoss etc…

Thank you for your help.

<?xml version="1.0" encoding="UTF-8"?>
<?xfa generator="AdobeLiveCycleDesignerES_V9.0.0.2.20101008.1.734229" APIVersion="3.1.20001.0"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2012-01-23T17:23:59Z" uuid="594e6d9b-2319-4fdb-b490-4d7655e56aa0">
<template xmlns="http://www.xfa.org/schema/xfa-template/2.4/">
   <?formServer defaultPDFRenderFormat acrobat7.0.5static?>
   <subform name="form1" locale="en_US" layout="tb">
      <pageSet>
         <pageArea>
            <contentArea name="ContentArea1" x="0pt" y="0pt" w="612pt" h="792pt"/>
            <medium short="612pt" long="792pt" stock="custom"/>
         </pageArea>
      </pageSet>
      <subform name="DynamicFragment">
         <bind match="none"/>
         <field name="currentDate" y="0mm" x="0.86mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_OBJR TextField1[3]?>
            <bind match="global"/>
         </field>
         <field name="trulyYours" y="129.578mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_FIELD_ID 30003?>
            <?PDF_OBJR TextField1[3]?>
            <bind match="global"/>
         </field>
         <field name="claimant" y="47.624mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_FIELD_ID 30003?>
            <?PDF_OBJR TextField1[3]?>
            <bind match="global"/>
         </field>
         <field name="ourInsured" y="42.618mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_FIELD_ID 30002?>
            <?PDF_OBJR TextField1[2]?>
            <bind match="global"/>
         </field>
         <field name="dateOfLoss" y="37.127mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_FIELD_ID 30001?>
            <?PDF_OBJR TextField1[1]?>
            <bind match="global"/>
         </field>
         <field name="ourClaimNumber" y="32.132mm" x="46.153mm" w="62mm" h="0.229167in" access="readOnly">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <?PDF_FIELD_ID 30001?>
            <?PDF_OBJR TextField1[0]?>
            <bind match="global"/>
         </field>
         <traversal>
            <traverse operation="first" ref="currentDate[0]"/>
         </traversal>
         <?templateDesigner isFragment yes?>
         <?templateDesigner fragmentTitle 3016DynamicFragment?></subform>
   </subform>
   <?templateDesigner FormTargetVersion 24?>
   <?templateDesigner Zoom 89?>
   <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?></template>
<config xmlns="http://www.xfa.org/schema/xci/1.0/">
   <agent name="designer">
      <!--  [0..n]  -->
      <destination>pdf</destination>
      <pdf>
         <!--  [0..n]  -->
         <fontInfo/>
      </pdf>
   </agent>
   <present>
      <!--  [0..n]  -->
      <destination>pdf</destination>
      <pdf>
         <!--  [0..n]  -->
         <fontInfo/>
         <version>1.65</version>
      </pdf>
      <xdp>
         <packets>*</packets>
      </xdp>
   </present>
</config>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.437709, 2010/08/04-17:30:07        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
         <xmp:MetadataDate>2012-01-23T17:23:59Z</xmp:MetadataDate>
         <xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool>
      </rdf:Description>
      <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
         <pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer>
      </rdf:Description>
      <rdf:Description xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" rdf:about="">
         <xmpMM:DocumentID>uuid:594e6d9b-2319-4fdb-b490-4d7655e56aa0</xmpMM:DocumentID>
      </rdf:Description>
      <rdf:Description xmlns:lcd="http://ns.adobe.com/livecycle/designer/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
         <lcd:fragmentCatalog>
            <rdf:Seq>
               <rdf:li rdf:parseType="Resource">
                  <dc:title>
                     <rdf:Alt>
                        <rdf:li xml:lang="x-default">3016DynamicFragment</rdf:li>
                     </rdf:Alt>
                  </dc:title>
                  <dc:description>
                     <rdf:Alt>
                        <rdf:li xml:lang="x-default"/>
                     </rdf:Alt>
                  </dc:description>
                  <dc:identifier>$template.form1.DynamicFragment</dc:identifier>
                  <lcd:fragmentRole>Subform</lcd:fragmentRole>
               </rdf:li>
            </rdf:Seq>
         </lcd:fragmentCatalog>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.1/">
   <locale name="en_US" desc="English (United States)">
      <calendarSymbols name="gregorian">
         <monthNames>
            <month>January</month>
            <month>February</month>
            <month>March</month>
            <month>April</month>
            <month>May</month>
            <month>June</month>
            <month>July</month>
            <month>August</month>
            <month>September</month>
            <month>October</month>
            <month>November</month>
            <month>December</month>
         </monthNames>
         <monthNames abbr="1">
            <month>Jan</month>
            <month>Feb</month>
            <month>Mar</month>
            <month>Apr</month>
            <month>May</month>
            <month>Jun</month>
            <month>Jul</month>
            <month>Aug</month>
            <month>Sep</month>
            <month>Oct</month>
            <month>Nov</month>
            <month>Dec</month>
         </monthNames>
         <dayNames>
            <day>Sunday</day>
            <day>Monday</day>
            <day>Tuesday</day>
            <day>Wednesday</day>
            <day>Thursday</day>
            <day>Friday</day>
            <day>Saturday</day>
         </dayNames>
         <dayNames abbr="1">
            <day>Sun</day>
            <day>Mon</day>
            <day>Tue</day>
            <day>Wed</day>
            <day>Thu</day>
            <day>Fri</day>
            <day>Sat</day>
         </dayNames>
         <meridiemNames>
            <meridiem>AM</meridiem>
            <meridiem>PM</meridiem>
         </meridiemNames>
         <eraNames>
            <era>BC</era>
            <era>AD</era>
         </eraNames>
      </calendarSymbols>
      <datePatterns>
         <datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
         <datePattern name="long">MMMM D, YYYY</datePattern>
         <datePattern name="med">MMM D, YYYY</datePattern>
         <datePattern name="short">M/D/YY</datePattern>
      </datePatterns>
      <timePatterns>
         <timePattern name="full">h:MM:SS A Z</timePattern>
         <timePattern name="long">h:MM:SS A Z</timePattern>
         <timePattern name="med">h:MM:SS A</timePattern>
         <timePattern name="short">h:MM A</timePattern>
      </timePatterns>
      <dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
      <numberPatterns>
         <numberPattern name="numeric">z,zz9.zzz</numberPattern>
         <numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
         <numberPattern name="percent">z,zz9%</numberPattern>
      </numberPatterns>
      <numberSymbols>
         <numberSymbol name="decimal">.</numberSymbol>
         <numberSymbol name="grouping">,</numberSymbol>
         <numberSymbol name="percent">%</numberSymbol>
         <numberSymbol name="minus">-</numberSymbol>
         <numberSymbol name="zero">0</numberSymbol>
      </numberSymbols>
      <currencySymbols>
         <currencySymbol name="symbol">$</currencySymbol>
         <currencySymbol name="isoname">USD</currencySymbol>
         <currencySymbol name="decimal">.</currencySymbol>
      </currencySymbols>
      <typefaces>
         <typeface name="Myriad Pro"/>
         <typeface name="Minion Pro"/>
         <typeface name="Courier Std"/>
         <typeface name="Adobe Pi Std"/>
         <typeface name="Adobe Hebrew"/>
         <typeface name="Adobe Arabic"/>
         <typeface name="Adobe Thai"/>
         <typeface name="Kozuka Gothic Pro-VI M"/>
         <typeface name="Kozuka Mincho Pro-VI R"/>
         <typeface name="Adobe Ming Std L"/>
         <typeface name="Adobe Song Std L"/>
         <typeface name="Adobe Myungjo Std M"/>
      </typefaces>
   </locale>
</localeSet></xdp:xdp>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:57:15+00:00Added an answer on May 28, 2026 at 7:57 am

    The expression you’ve shown — //field[@name] — selects all field elements that have a name attribute. What you need to do is select the attribute itself. Like this:

    //field/@name
    

    Regarding namespaces: Your target nodes are found in the http://www.xfa.org/schema/xfa-template/2.4/ namespace. Any XPath expression must take this into account with the following steps:

    1. Register the namespace to a prefix with your XPath engine. How this is done depends on the host language you’re using to evaluate the expression. In Java, for example, this is done by creating a javax.xml.namespace.NamespaceContext that gets registered with the javax.xml.xpath.XPath instance.

    2. Use the prefix you registered in step 1) to query elements in the target namespace. So, for example, if you were to register http://www.xfa.org/schema/xfa-template/2.4/ with the prefix xfa, then you’d write the expression like this:

      //xfa:field/@name
      

    Namespace-agnostic solution: It is possible (but not necessarily recommended) to select the target nodes without accounting for namespaces with the following expression:

    //*[local-name()='field']/@name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.