Refine your search:

I'm building my first Advanced XML dashboard and need some guidance.

I'm using Notepad++ to build my dashboard and then copying it into a new view. But when I try to save the view I get this error at the top of the page: Encountered the following error while trying to update: In handler 'views': Not valid XML:

Not really helpful for debugging since it doesn't tell me where the syntax error is in my xml.

I looked in /opt/splunk/var/log/splunk but don't see anything that's logging my error.

Just wondering how to troubleshoot my error and best practices for building advanced XML dashboards.

Thanks

asked 09 Nov '10, 01:31

nowplaying's gravatar image

nowplaying
334
accept rate: 0%


2 Answers:

The best advice I can give is to spend some time keeping your indentation clean.

I believe Notepad++ has a preview mode where you can preview the file in a local browser, and the browser will tell you what tags didnt match, and it's much faster than using Splunk itself to check for well-formedness.

And if you're on a linux or unix system, tidy can be a very useful tool:

tidy -i -m -xml my_view.xml

OR

tidy -i -xml my_view.xml -f cleaned_up_version.xml

If your XML is already valid, those will go through and clean up and normalize all your indentation for you. And I think if you do have typos or missing closing tags, tidy can tell you what and where they are.

link

answered 09 Nov '10, 01:52

nick's gravatar image

nick ♦
14.2k1318
accept rate: 46%

Nick's thoughts are excellent. I've also used the XML Validator at w3schools when on a vanilla Windows® box.

link

answered 09 Nov '10, 03:40

bwooden's gravatar image

bwooden ♦
2.3k19
accept rate: 38%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×161

Asked: 09 Nov '10, 01:31

Seen: 1,282 times

Last updated: 09 Nov '10, 03:40

Copyright © 2005-2012 Splunk, Inc. All rights reserved.