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

  • SEARCH
  • Home
  • 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 8706635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:39:43+00:00 2026-06-13T03:39:43+00:00

I am getting this error when I am trying to parse XML from batch

  • 0

I am getting this error when I am trying to parse XML from batch Script

 error : 
 < was unexpected at this time.

xml:

<driver type=".dbdriver">
        <attributes>localhost;1521;XE;false</attributes>
        <driverType>Oracle thin</driverType>
      </driver>
      <password>7ECE6B7E7D2AF514C55BAE8B3A6B51E7</password>
      <user>JR</user>

batch scrpit:

for /f "tokens=3 delims=><" %%j in ('type %SETTINGSPATH% ^| find "<user>"') do set user=%%j

This code is supposed to read user value from XML which is just “JR” and on some machines I am getting this values; but some machines are not showing this value and showing this error.

Please guide.

  • 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-13T03:39:44+00:00Added an answer on June 13, 2026 at 3:39 am

    Parsing XML with batch is often problematic and always risky. A valid XML documented could be legitamately reformatted in any number of ways that would break you parser. But if you really want to continue to use batch…

    That error message occurs when you have an unescaped and unquoted < character in your IN() clause. The "<user>" is already quoted, so that normally should not be a problem. The problem must stem from the value contained in %SETTINGSPATH%. Either the value must have an unquoted and unescaped <, or there must be an odd number of quotes in the value. The odd number of quotes would cause the <user> to no longer be quoted.

    The only other possibility is that you have not shown us all your code, and the error is occuring someplace else.

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

Sidebar

Related Questions

I am getting this error while trying to Parse the Xml response from the
I'm getting this error (see title) while trying to parse an XML file in
I'm getting this strange error message when trying to clone or pull from git.
Could someone help me understand why I'm getting this error: javax.xml.bind.UnmarshalException: unexpected element (uri:,
I am new to php and I am getting this error trying to load
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
I'm getting this error when trying to access my webservice running inside tomcat. Caused
I am getting this error when trying to merge TFS2008. There are no pending
I keep getting this error while trying to modify some tables. Here's my code:
I'm new to AS3 and I'm getting this error while trying to implement OO

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.