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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:16:04+00:00 2026-06-08T16:16:04+00:00

I am trying to format this file using xmlstarlet The file: <file_info> <name><OUTFILE_0/></name> <generated_locally/>

  • 0

I am trying to format this file using xmlstarlet

The file:

<file_info>
<name><OUTFILE_0/></name>
<generated_locally/>
<upload_when_present/><max_nbytes>99999999999999999999999999999999999</max_nbytes><url><UPLOAD_URL/></url>
</file_info>
<result>
<file_ref><file_name><OUTFILE_0/></file_name>
<open_name>output</open_name>
<copy_file/></file_ref>
</result>

The command:
xmlstarlet fo –indent-tab –omit-decl templates/newApp_re_novo.xml > templates/newApp_re.xml

And i receive this message: templates/newApp_re_novo.xml:1.145: Extra content at the end of the document
9999999999999999999999999999999

I think it happens because I have two main tags: and
But I need the file like this. What could I do?

Thanks.
Felipe

  • 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-08T16:16:05+00:00Added an answer on June 8, 2026 at 4:16 pm

    A valid XML document always has a single root node and xmlstarlet can only handle valid XML documents. A bit of pre and post processing can get around this:

    { echo '<R>'; cat forest.xml; echo '</R>'; }      | # make into a proper tree
    xmlstarlet fo --indent-tab                        | # indent
    xmlstarlet sel -t -c /R/file_info -n -c /R/result | # break apart into a forest
    sed 's/^\t//'                                       # remove extra indentation
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to format a number, like this 123.123,00. I am using an
I'm using Excel 2010. I'm trying so save my excel file, with this code.
I am trying to generate excel file using various currencies. This works fine public
im trying to convert a date format into a new format in this example
Apologies if this is a dumb question but I'm trying to format a currency
I'm trying to format a table from XML. Lets say I have this line
Trying to understand PNG format. Consider this PNG Image: The Image is taken from
I'm trying to parse dates with a given format and I've found this which
I am trying to format some html output from my db using php and
I am trying to replace a variable stored in another file using regular expression.

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.