Looping through a list with an iterator

Hi I have a list of objects allCrecords which I want to loop through using an iterator In the method printcoauthors I have to create another instance of class Extractdata because that's where the objects are added to the list allCrecords. The getauthor, getcoauthor and gettitle are methods in the Coauthorship class where this method printcoauthors is also
public void printcoauthors(String currentauthor){
         Extractdata ed = new Extractdata();
    for(Iterator it = ed.allCrecords.iterator();it.hasNext();){
        if(currentauthor.equals(getauthor()))
            System.out.println(getcoauthor());
        else if (currentauthor.equals(getcoauthor()))
            System.out.println(getauthor());
            System.out.println(gettitle());
           Object element = (Object)it.next();
    }thanks in advance

Here's the extractdata class it takes data from an xml file and stores it as strings or lists or arrays
public class Extractdata {
     public String name1, name2, TITLE;
          SNAnalyser sn = new SNAnalyser();
          Document doc = sn.extractDoc();
     public List allCrecords = new ArrayList();
  /** Creates a new instance of extractdata */
  public Extractdata(){
  public void extract(){ 
       List allauthors = new ArrayList();
       allauthors = Collections.synchronizedList(new ArrayList(allauthors));
       allCrecords = Collections.synchronizedList(new ArrayList(allCrecords));
       List alltitles = new ArrayList();
       alltitles = Collections.synchronizedList(new ArrayList(alltitles));
       String[] names = new String[20];
      NodeList records1 = doc.getElementsByTagName("record");
        for( int i = 0; i < records1.getLength();i++)
            Record records = null;
            Element record = (Element) records1.item(i);
            NodeList headers = record.getElementsByTagName("header");
            Element header = (Element) headers.item(0);
            NodeList ids = header.getElementsByTagName("identifier");       
                Element id = (Element) ids.item(0);
                String ID = getText(id);
                NodeList metadatas = record.getElementsByTagName("metadata");
                Element metadata = (Element) metadatas.item(0);
                NodeList citeseers = metadata.getElementsByTagName("oai_citeseer:oai_citeseer");
                Element citeseer = (Element) citeseers.item(0);
                NodeList titles = citeseer.getElementsByTagName("dc:title");
                Element title = (Element) titles.item(0);
                TITLE = getText(title);
                NodeList subjects = citeseer.getElementsByTagName("dc:subject");
                Element subject = (Element) subjects.item(0);
                String SUBJECT = getText(subject);    
                NodeList descriptions = citeseer.getElementsByTagName("dc:description");
                Element description = (Element) descriptions.item(0);
                String DESCRIPTION = getText(description);                
                //Writing data to class Record
                Record r = new Record(ID, TITLE, allauthors);
                //Write to text files
                writeTo(DESCRIPTION,SUBJECT, i);
                //Extract attributes authorname(s) from xml file
                NodeList authors = citeseer.getElementsByTagName("oai_citeseer:author");               
                for(int l = 0; l < authors.getLength(); l++){
                    Element author = (Element) authors.item(l);
                    names[l] = author.getAttribute("name");
                    allauthors.add(names[l]);
                //Checks if the document was cowritten
                if(authors.getLength() > 0)            
                            for(int z = 0; z < authors.getLength(); z++){
                           //Begin with the second author so not to include the author in the list of coauthors
                                    for(int w = 1; w < authors.getLength(); w++){
                                       //Ensures that the author is not counted as a co-author
                                        if(z != w){
                                            name1 = names[z];
                                            name2 = names[w]; 
                                        //Creates a new instance of Coauthorship
                                      Coauthorship c = new Coauthorship(name1, name2, TITLE);
                                      allCrecords.add(c);
  public void printallCrecords(){
      Iterator iter = allCrecords.iterator();
      while(iter.hasNext())
          System.out.println(iter.next());
  public String getname1() {
      return name1;
   public String getname2() {
      return name2;
    public String getTITLE() {
      return TITLE;
   public void writeTo(String DESCRIPTION, String SUBJECT, int i){
      try{
      //Write to text files 
      String testing = "test.txt";
      File dir = new File ("Description/" + i);
      dir.mkdirs();
      File file = new File(dir, testing);
      FileOutputStream fout = new FileOutputStream(file);
      Writer out = new OutputStreamWriter(fout, "UTF-8");
      out = new BufferedWriter(out);
      out.write(SUBJECT);
      out.write(" ");
      out.write(DESCRIPTION);
      out.flush();
      out.close();     
      catch (IOException e) {
      System.out.println(
       "Due to an IOException, the parser could not check citeseer.xml");
    public String getText(Node node) {
    // We need to retrieve the text from elements, entity
    // references, CDATA sections, and text nodes; but not
    // comments or processing instructions
    int type = node.getNodeType();
    if (type == Node.COMMENT_NODE
     || type == Node.PROCESSING_INSTRUCTION_NODE) {
       return "";
    StringBuffer text = new StringBuffer();
    String value = node.getNodeValue();
    if (value != null) text.append(value);
    if (node.hasChildNodes()) {
      NodeList children = node.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i); 
        text.append(getText(child));
    return text.toString();
  }

Similar Messages

  • Text is not being displayed in sync on a label when looping through a list -- how to fix?

    I have a list of states (50 states).  I loop through this list (in a winform app -- VS2012) and want to display the current state ID that is being processed in the loop in the text property of a label.  I precede the label.Text = StateID line with
    Application.DoEvents() but I am also (in Debug mode) writing the same text to the console.  The console displays correctly, but there appears to be a lag in the label.Text property
    List<string> StateList = new List<string> { "al", "ak", "az","ar","ca","co","ct","de","fl","ga",...};
    foreach (string stateID in StateList)
        Application.DoEvents();
        lblStateID.Text = "State is " + stateID;  //--there is a lag here
    I vaguely recollect something about a NotifyPropertyChanged event.  I know this is common in WPF, but is there something similar in winform?  Or is there a way to make the desired text to be displayed in the label.Text property in synchronization
    with the loop?
    Rich P

    Thank you.  This is way simpler than implementing the INotifyPropertyChanged Interface.  Although, here is an article on the INotifyPropertyChanged Interface and event
    http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    Rich P

  • Problem when loop through a list within CollectionModel

    In my bean, I have these codes to define a node.
    Map<String, Object> node = new HashMap<String, Object>();
    node.put("Nodeid", nodeid);
    List theColors = new ArrayList();
    node.put("Colors", colors);
    node.put("Type", type);
    node.put("Desc", desc);
    Then, a list of these nodes are converted to CollectionModel using ModelUtils.toCollectionModel(nodes);
    In my jspx, I am able to loop through nodes, and get Type, Nodeid and Desc from the node to show on the screen.
    I am trying to loop through the list of colors within the node to draw circles with different diameter.
    <af:forEach var="theColor" items="#{node.Colors}" varStatus="vs">
    <dvt:pointLocation pointX="50%" pointY="50%">
    <dvt:marker id="mk2" scaleX="#{15-vs.index*2}" scaleY="#{15-vs.index*2}" shape="circle" fillColor="#{theColor}" />
    </dvt:pointLocation>
    </af:forEach>
    But above code does not work.
    Can someone help me? Any suggestions?
    Thanks.

    I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
    Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
    The server produces an html file, and sends it to the client.
    Java stops running.
    Java cannot call javascript, javascript can not call java. There is no direct communication.
    Java code can produce javascript code to run on a page.
    The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)

  • How to Loop through another list and update a column with SharePoint Designer 2013 Workflow

    Hi,
    I am trying to get my head around the new 2013 Workflow Engine and SharePoint Designer 2013 Workflow Text-Based Designer.
    I have two lists.
    List A has 2 columns: Title, Completed (Yes/No)
    List B has 3 columns: Title, LookupListATitle, Completed (Yes/No)
    All the 2013 Workflow components have been installed and configured and I am selecting the 2013 Workflow option in SPD
    I am trying to set off a 2013 Workflow when an item in List A is edited to Loop through List B and select items where the LookupListATitle column's value is equal to the Title value of the current item, and set the value of the Completed column for those
    items in ListB to "Yes".
    I have the Workflow configured like this:
    Stage: Stage 1
    IF Current Item:Completed equals Yes
    Loop: 1
    The contents of this loop will run repeatedly while: ListB:LookupListATitle equals Current Item: Title
    Update item in ListB. 
    (The dialog options for the update item action as follows:
    List: ListB
    Field: Completed, Value: Yes
    In the Find the List Item section
    Field: LookupListATitle
    Value: Current Item: Title)
    Transition to stage
    Go to End of Workflow
    When I update an item in ListA and set its Completed column to Yes, I would expect the Workflow to find all the items in List B where the Lookup column is equal to ListA's Title (there are 2) and update their Completed column to Yes. But it doesn't work.
    When I look at the Workflow Status it says the Internal Status is "Canceled" and the information pop up has the following alien language (and may be truncated):
    RequestorId: 95f03b62-8956-ac14-c5cf-dc98c89c589c. Details: System.ArgumentException: Invalid JSON primitive: Item001. Parameter name: value at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ConvertStringToJsonNumber(String value) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ReadPrimitive(String
    type, XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(Stream jsonStream, Byte[] jsonBytes)
    at Microsoft.Activities.DynamicValue.ParseJson(String json) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
    executor, BookmarkManager bookmarkManager, Location resultLocation)
    Unfortunately I don't have access to the server, logs etc.
    I would love to find some tutorials, or any books on SharePoint Designer 2013 in general and Workflows in particular but my searches haven't turned up much so far apart from a pre-release Beginning SharePoint Workflows which is in its very early stages and
    not much help yet.
    Can anyone give me some guidance on how to set up While Loops to iterate through a related list using SharePoint Designer 2013?
    Mark

    Hi,
    I understand that you wanted to update the items in the other list (Participants) where the Course equals the Current Item.
    You need to use “Call HTTP Web Service" action and “Build Dictionary" action to get the Maxid and then loop Participants to update the items.
    You can follow the steps as below to achieve what you want:
    Create a custom list named Courses, add columns: Title(Single line of text), Course ID(Single line of text), Course Finalised (Yes/No).
    Create a custom list named Participants, add columns: Title(Single line of text), Course(Lookup), CourseFinalised (Yes/No).
    Create workflow associated to Courses, start the workflow automatically when an item is created or changed.
    Add conditions and actions:
    The HTTP URL is set to
    https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be order by Id and desc.
    Then if Course Finalised is equal to Yes, the CourseFinalised  of the associated items in Participants will be updated to Yes.
    More information:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Looping through Multiline list in Workflow

    We have a Workflow that sends an email with an Office document (ie., Excel) as an attachment to each Executing Service Engineer on service items that are relevant for planning. In an attempt to do that we loop through a multiline list, which is used to hold the relevant service items for processing.
    1.     We created an activity step Initialize work items count to store the number of service work items, e.g. Work_items_count
    2.     We use a loop step (loop until) to keep looping while work_items_count has a value greater than zero.
    3.     Within the loop, we use another activity step Get install item ibase components that processes the first item of the multiline container element Work_items and returns the ibase components for the Executing Service Engineer. After processing has completed, we delete the item from Work_items and decrement the counter work_items_count by 1.
    4.     As part of the final steps in the loop, an Excel document is created from a template using a standard object method WF_DOC-CREATE. The document is than converted to an SOFM object using standard object method WF_DOC-CREATE_SOFM, and than an email is generated with the SOFM object as an attachment using standard object method SELFITEM-SENDTASKDESCRIPTION.
    The problem that’s occurring is that on the second loop pass, the status for activity step Get install item ibase components is set to ready expecting user intervention. I know that it’s a dialogue step, but why than does it execute seamlessly on the first loop pass? I’ve set the agent assignment on the Workflow and on the task to General task so that anybody can execute it so I don’t think it’s an agent assignment problem.
    Does anyone have any suggestions? Do i need to use dynamice parallel processing in this case?

    We have a Workflow that sends an email with an Office document (ie., Excel) as an attachment to each Executing Service Engineer on service items that are relevant for planning. In an attempt to do that we loop through a multiline list, which is used to hold the relevant service items for processing.
    1.     We created an activity step Initialize work items count to store the number of service work items, e.g. Work_items_count
    2.     We use a loop step (loop until) to keep looping while work_items_count has a value greater than zero.
    3.     Within the loop, we use another activity step Get install item ibase components that processes the first item of the multiline container element Work_items and returns the ibase components for the Executing Service Engineer. After processing has completed, we delete the item from Work_items and decrement the counter work_items_count by 1.
    4.     As part of the final steps in the loop, an Excel document is created from a template using a standard object method WF_DOC-CREATE. The document is than converted to an SOFM object using standard object method WF_DOC-CREATE_SOFM, and than an email is generated with the SOFM object as an attachment using standard object method SELFITEM-SENDTASKDESCRIPTION.
    The problem that’s occurring is that on the second loop pass, the status for activity step Get install item ibase components is set to ready expecting user intervention. I know that it’s a dialogue step, but why than does it execute seamlessly on the first loop pass? I’ve set the agent assignment on the Workflow and on the task to General task so that anybody can execute it so I don’t think it’s an agent assignment problem.
    Does anyone have any suggestions? Do i need to use dynamice parallel processing in this case?

  • Looping through List

    Hello everyone,
    I have some troubles looping through a List using JSTL.
    I have a List (itemList) of ItemConfiguration objects stored in session that i want to loop through. This is what i got so far:
    <table width="200" border="0" cellpadding="0" cellspacing="0">
    <jsp:useBean id="itemList" class="" scope="session" />
    <c:forEach items="${itemList}" var="itemConfig">
      <tr>
         <td width="5"><img src="images/pixel.gif" width="1" height="2" /></td>
         <td width="190"><img src="images/pixel.gif" width="1" height="2" /></td>
         <td width="5"><img src="images/pixel.gif" width="1" height="2" /></td>
      </tr>
      <tr>
         <td width="5"> </td>
         <td width="190" align="center" class="menu"><c:out value="${itemConfig.name}" escapeXml="false"/></td>
         <td width="5"> </td>
      </tr>     
    </c:forEach>
    </table>ItemConfiguration class have get/set methods (getName()/setName())
    Can someone help me? im stuck at this and can�t make it work.
    Thanks in advance

    Try like this,
    <logic:iterate id="myArray" property="itemConfig" Collection="<%=itemList%>">     
         <bean:write name="myArray" property="name" filter="false"/>"
    </logic:iterate>
    {code}                                                                                                                                                                                                                                                                                                                                                                                       

  • Looping through list, searching for text

    If i am looping through a list and trying to find the text I am looking for to make a selection statement, how would i achieve that?
    <cfif text="TheTextI'mLookingFor></cfif>?

    you would use Find of FindNoCase function.
    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7e 7c.html

  • List with more than 1000 elements

    I'm trying to use this query:
    select *
    from street
    where street_cod in ('street_code_list')
    It working well when the 'street_code_list' has less than 1000 codes but it fails when it have more, with a message that says that a list can't have more than 1000 elements. How can I fix this problem? Can I use any other kind of object to store my list?
    I'm querying the database in ColdFusion using ODBC.
    Thank you in advance,
    Rui

    Another thing to consider doing is simply creating a "list table" which would contain your list elements and allow you to do a
    SELECT X
    FROM Y
    WHERE X IN (SELECT X
    FROM Z)
    type query.
    I don't know where you are getting your list from, but if it is persistant (i.e, doesn't change with every program run) this is certainly a viable option (and may be usable even if the list does change every run).
    If this is being executed in PL/SQL (or some other procedural language) you could also just loop through your list: execute the query with the first 1000 list elements and do your processing, then the next, and so on. Of course, to some extent this depends on your processing, but if you need the entire result set before you can process it, then you could store the individual result sets in a PL/SQL table or an array (if you are using Pro*C or whatever) and then process when the PL/SQL table/array was fully populated.

  • Upload XLS File, Loop through rows query a DB

    What I would like to do is enable the user to upload an excel
    spreadsheet with one column and many row of IP's. Then put the ips
    in a list or array and loop through the list and query a table to
    get the IPs that match the list.
    Any help would be greatly appreciated.

    We have some similar apps except that, instead of uploading a
    file, the users copy and paste the column into a text area. Then we
    do this:
    <!--- First, replace carraige returns (chr(13)) and line
    feeds (char(10)) with commas --->
    <cfset
    hscnumbers=Replace(form.hscnumbers,chr(13)&chr(10),",","ALL")>
    <!--- remove last comma, if commas exist (there may be
    only one hsc number) --->
    <cfif find(",", hscnumbers) gt 0 and right(hscnumbers, 1)
    is ",">
    <cfset hscnumbers = left(hscnumbers, len(hscnumbers) -
    1)>
    </cfif>
    And then we have a list to send to the db.

  • Looping through email addresses. CFTRY/CFCATCH

    I am building an email system that will be looping through a
    list of email addresses in our database and sending mail via
    CFMAIL. Alot of times, the email addresses are bad. i.e.: no
    ".com", a comma in the email address, bad characters etc. How can I
    loop through the email addresses sending them out, but when CFMAIL
    errors out because of a bad address, the loop continues on ignoring
    the bad address. Can I do this with CFTRY/CFCATCH? Will
    CFTRY/CFCATCH halt the process entirely or will it catch it then
    continue on?

    Cold Fusion has an isvalid function you can use to confirm
    that any
    given string is a properly formatted email address. You can
    use this to
    prevent improperly formatted addresses from getting into your
    db in the
    first place.
    If ColdFusion was used to put the email address into the
    database in the
    first place. That is not always true. Some places have more
    the one
    application working with a given database.
    Now using isValid to validate the address before attempting
    to use it in
    a <cfmail...> tag may provide some value, but would
    still be comfortable
    with wrapping the tag with a try catch. I just like to do so
    whenever I
    am playing with other protocols.

  • Looping through objects - testing links

    Hi
    I have a script that moves all instances of a linked object according to user defined X,Y values.
    In order to do this, I need to loop through all objects with links
    What is the best way to do this?
    As of now, this is what I am doing:
    var g = myDoc.allGraphics;
    for (var i=0; i<g.length; i++) {
         if (g[i].itemLink.name == USER_LINK) {
              g[i].parent.move(undefined, [USER_X, USER_Y]);
    It works well, however I ran into some problems where link was null
    Also, is it always the graphic that is linked, or can its parent be linked as well?
    If not, then I can just condition that if itemLink == null - continue
    Any advice and guidance would be much appreciated
    Thanks
    David

    It works well, however I ran into some problems where link was null
    if (g[i].itemLink && g[i].itemLink.name == "USER_LINK")     //     should be enough
    Also, is it always the graphic that is linked, or can its parent be linked as well?
    Graphic can be linked ==> itemLink !=null and itemLink.status can vary
    or pasted ==> itemLink == null.
    As far as I know graphic.parent can not be linked.
    However not every linked graphic.parent can be moved. I e. those one which are anchored with
    AnchorPosition.INLINE_POSITION and AnchorPosition.ABOVE_LINE
    Above case can be a source of error as well.
    Consider also locked object or locked entire layers.
    Jarek

  • Loop Through Date Range

    Hi guys,
    I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop through this date range and want to get date like
    01/JAN/2009,02/JAN/2009.....16/JAN/2009.how can i achive this ?
    Thanks
    Ron

    Hi,
    What do you mean by loop through?
    SQL> with dates as (select to_date('01/JAN/2009', 'dd/mm/yyyy') start_date
                         ,to_date('16/JAN/2009', 'dd/mm/yyyy') end_date from dual)
    select start_date + level - 1 from dates connect by level <= end_date - start_date + 1
    START_DATE
    01/01/2009
    02/01/2009
    03/01/2009
    04/01/2009
    05/01/2009
    06/01/2009
    07/01/2009
    08/01/2009
    09/01/2009
    10/01/2009
    11/01/2009
    12/01/2009
    13/01/2009
    14/01/2009
    15/01/2009
    16/01/2009
    16 rows selected.Regards
    Peter

  • Loop through Dimension

    Is there a way to,
    1 - get a list of zero level dimension members
    2 - determine the count and set it equal to a variable
    3 - loop through the list and set an "If" condition to execute if the UDA equals a certain value?
    Thanks,
    J

    Hi J,
    1. When you say 'setting' a variable . you are going to assign based on certain conditions or criteria.
    i.e ex: if UDA of xyz is abc then
    assign something to somthing.
    2. you also mentioned , "number of level zero member" , I understand that you want assign the value i.e number,whihc you can attain using cross dim operator.
    Revert back for further clarification.
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • Iterating though a List with a 'next' button.

    Hey people,
    I am just finishing off my GUI but I had a thought, I really would like to have next and previous buttons so I can move through my list.
    However I started by implementing the 'Next' button, but I have run into some trouble, on the GUI I want the user to click next and it moves obviously to the next record, then they can hit it again and it moves onto the next record again.
    However when I tried to do this, the interator refuses to move to the next record, it just stays at they record with the index of 0.
    I've read some books, done some research and tried all the ways I can think of, but to no avail, my code for the 'Next' method is below, the button on the GUI just calls it from a separate class.
    public void MusicNext()
    ListIterator titerator = iList.listIterator();
    if(titeration.hasNext())
    System.out.println(titerator.next());
    }

    Hmmm, I am a little confused (yes I am stupid), heres my code:
    import java.util.*;
    public class MusicList
                private List iList;  //names are stored in a list.
         public MusicList()
              iList = new LinkedList();
         public MusicList(List pListOfMusic)
              iList = pListOfMusic;
            //Here's the interator, but I get a null pointer exception error.
            ListIterator titerator = iList.listIterator();
            public void MusicNext()
                    if(titerator.hasNext())
              System.out.println(titerator.next());
         public void addMusic(Music pMusicName)
                iList.add(pMusicName);
         public void removeMusic(Music pMusicName)
              iList.remove(pMusicName);
            //Return the name with the given surname, otherwise return null.
         //Uses a linear search.
            public Music findTitle(String pTitle)
              Music tTitle = null;
              boolean found = false;
              Iterator it = iList.iterator();
              while (it.hasNext() && !found)
                   tTitle = (Music) it.next();
                   found = tTitle.getTitle().equalsIgnoreCase(pTitle);
              if(!found) tTitle=null;
              return tTitle;
         public Music findAuthor(String pAuthor)
              Music tAuthor = null;
              boolean found = false;
              Iterator it = iList.iterator();
              while (it.hasNext() && !found)
                   tAuthor = (Music) it.next();
                   found = tAuthor.getAuthor().equalsIgnoreCase(pAuthor);
              if(!found) tAuthor=null;
              return tAuthor;
            public Music findPublisher(String pPublisher)
              Music tPub = null;
              boolean found = false;
              Iterator it = iList.iterator();
              while (it.hasNext() && !found)
                   tPub = (Music) it.next();
                   found = tPub.getPublisher().equalsIgnoreCase(pPublisher);
              if(!found) tPub=null;
              return tPub;
         public String toString()
              return "Music List = " + iList.toString();
    }Thanks,
    Rob.

  • Can I share a Reminders list with someone else through iCloud?

    I am wondering if I can create shared lists with my wife (separate iTunes account) in Reminders on iPhone/iPad that we can instantly update through iCloud. We're essentially talking about grocery lists and the like.  (Yes, I know there are grocery apps out there but that's not exclusively what we're trying to do).  We both have iOS 6 or higher.  I have found a few posts related to this question but it appears as though the sharing functionality might have been lost with a recent iOS upgrade.  Not sure though. Could anybody help?

    http://www.macrumors.com/2012/10/15/apple-adds-shared-reminders-to-icloud-com-we b-app/

Maybe you are looking for