Menu

Read the same tag repeatly

Help
2009-05-07
2013-05-15
  • david Rodriguez

    david Rodriguez - 2009-05-07

    I have the next squema
      
    <xs:element name="ET1" minOccurs="0">
    <xs:complexType>
            <xs:sequence>
                <xs:element name="A" minOccurs="1"  maxOccurs="5>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                            <xs:maxLength value="10"/>
                    </xs:restriction>
                </xs:simpleType>
                    </xs:element>
            </xs:sequence>
    </xs:complexType>
    </xs:element>

      <ET1>
                <A>1</A>
                <A>2</A>
                <A>3</A>
                <A>4</A>
                <A>5</A>
      </ET1>

    vg = new VTDGen();

    private AutoPilot ET1    = new AutoPilot();;
    private AutoPilot A    = new AutoPilot();;

    ET1.selectXPath(getResourceStr(cClase, "X_T1"));
    A..selectXPath(getResourceStr(cClase, "X_A"));

    ET1.bind(vn);
    A.bind(vn);
    while(ET1.evalXPath()!=-1){
    while(A.evalXPath()!=-1){
          a.evalXPathToString()
    }

    Only read two first tags

    1
    2

    Any idea?

     
    • jimmy zhang

      jimmy zhang - 2009-05-08

      will investigate and get back

       
    • jimmy zhang

      jimmy zhang - 2009-05-08

      Can you try the following and let me know if it works or not...

      while(ET1.evalXPath()!=-1){
        vn.push();
        while(A.evalXPath()!=-1){
              a.evalXPathToString()
        }
        vn.pop();
      }

       

Log in to post a comment.