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 8571465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:47:15+00:00 2026-06-11T18:47:15+00:00

I can not find any peek or unread function in the XMLStreamReader documentation. What

  • 0

I can not find any peek or unread function in the XMLStreamReader documentation. What is the preferred way to get at least one token look ahead in order to parse a list of child elements as in the the HTML list for example?

<ul>
  <li>
  <li>
</ul>

When I create a recursive decent parser with parse functions for ul and li the li parse function has to terminate when it finds the closing tag of ul, but it must not consume it, because the ul parse function needs it to succeed.

I am used to solve such problems with peek or unread but they seem to be missing. What is the preferred Java way to solve this problem?

Update: I implemented the parser without look ahead using the XMLStreamReader.

  • 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-06-11T18:47:16+00:00Added an answer on June 11, 2026 at 6:47 pm

    There seems to be no straighforward way of doing this. Could you perhaps use the XMLEventReader to accomplish the same functionality?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HEllo , i can not find any way to get horizontal or/and vertical resolution
I can not find any documentation for this - is it possible?
I can not find any documentation that specifies on which thread WebClient raises its
I have looked up Google and Spring documentation but can not find any thing
So I've been looking around for days now and I can not find any
I can not find a mod_go for deploying Go web applications. Is there any
I have not been able to find any definitive answers to this question: Can
I've searched around but I can't find any information about this; maybe I'm not
all. Maybe i've not googled enough, but i can't find any example on this
I can not find any help on this issue in vs2008 help, Google, or

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.