Go Back   vb.org Archive > Community Central > Community Lounge

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2005, 10:35 PM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Editing XML Files?

What is the best program(s) to use to edit a XML file? We've tried notepad and HTML editors and while they do allow us to edit the files, when we save them as XML and open the files again we get errors So what's the best thing to use to edit them? :ermm:
Reply With Quote
  #2  
Old 10-14-2005, 10:59 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dreamweaver has some simple support for XML (especially Dreamweaver 8). There are also very powerful XML tools such as Oxygen. Eclipse also has XML support.

What errors do you get? As long as you use valid XML, I don't see how you could get errors saving and reopening the file.

As a side note, XML is awesome. Anybody reading this thread who doesn't know XML should learn it immediately. I'm using XML for a new project at my web site that will blow your mind (I am not modest). Hint: with XML, you can publish information from vBulletin to any other application that supports XML parsing. And yes, you can create XML in PHP: http://www.php.net/dom .
Reply With Quote
  #3  
Old 10-14-2005, 11:15 PM
Guest190829
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by filburt1
Dreamweaver has some simple support for XML (especially Dreamweaver 8). There are also very powerful XML tools such as Oxygen. Eclipse also has XML support.

What errors do you get? As long as you use valid XML, I don't see how you could get errors saving and reopening the file.

As a side note, XML is awesome. Anybody reading this thread who doesn't know XML should learn it immediately. I'm using XML for a new project at my web site that will blow your mind (I am not modest). Hint: with XML, you can publish information from vBulletin to any other application that supports XML parsing. And yes, you can create XML in PHP: http://www.php.net/dom .
I just got a bunch of xml books that I ordered off of Amazon. I'm really excited about learning it for my website.
Reply With Quote
  #4  
Old 10-14-2005, 11:24 PM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by filburt1
What errors do you get? As long as you use valid XML, I don't see how you could get errors saving and reopening the file.
This is the error we're getting using notepad.

Quote:
The XML page cannot be displayed.
Cannot view XML input using style sheet.

--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource Line 1, Position 1
Reply With Quote
  #5  
Old 10-14-2005, 11:50 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure Notepad is opening it and not Internet Explorer?
Reply With Quote
  #6  
Old 10-15-2005, 12:05 AM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The first time or the second time? We originally opened it in IE and copied it. Then we pasted it in notepad and edited/saved as xml. When we reopen it we get the error above, although every once and a while it does open correctly (after saving it).
Reply With Quote
  #7  
Old 10-15-2005, 12:12 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You probably copied the visual expand/collapse bits. Don't use IE at all for XML except for viewing (and I use Firefox for that). Only copy and paste in a text or XML editor.
Reply With Quote
  #8  
Old 10-15-2005, 12:52 AM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That was the problem. Now when I open straight to notepad/wordpad and edit/save it seems to save correctly

Thank you filburt1, I appreciate the help! I'm also downloading Oxygen now
Reply With Quote
  #9  
Old 10-16-2005, 08:34 PM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We went to the library and got a bunch of books on XML. It's very straight forward and easy to learn. You can even double quote with it. There is however one thing that we don't understand and we can't find in any of the XML manuals, so hopefully someone here knows the answer. We noticed on a lot of skins that the date area is written out as 'date="1121280429"' or 'date="1121146500"' or similar.

Why is this? :ermm:
Reply With Quote
  #10  
Old 10-16-2005, 08:44 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It represents seconds since the epoch (midnight on January 1st, 1970). It's the standard date format that vB adopted as well. It has the benefit of very easy mathematical calculactions including comparisons and difference as well as storage as a simple numeric type, but the disadvantages of not being human-readable in the slightest.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04575 seconds
  • Memory Usage 2,247KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete