- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- XML::Simple doesn't handle </tag> shorthand notati...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2005 03:54 PM
тАО01-18-2005 03:54 PM
an empty closing tag. Ie supposedly this XML fragment
can be written with the shorthand:
However XML::Simple gags with a "mismatched tag" (details appended).
Any ideas?
Thanks in advance!
-Ted
---- cut here for demo ----
alps(ted) 743>cat dumpit.pl
#!/opt/perl/bin/perl
# use module
# create object
$xml = new XML::Simple;
# read XML file
$data = $xml->XMLin("./$ARGV[0]");
# print output
print Dumper($data);
alps(ted) 746>dumpit.pl fkd.up.xml
mismatched tag at line 3, column 10, byte 56 at /opt/perl/lib/site_perl/5.6.1/PA
-RISC1.1-thread-multi/XML/Parser.pm line 168
alps(ted) 747>
Solved! Go to Solution.
- Tags:
- XML
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2005 07:12 PM
тАО01-18-2005 07:12 PM
Re: XML::Simple doesn't handle </tag> shorthand notation??
If nested, XML elements must be strictly nested: each start tag must have a corresponding end tag, and elements cannot overlap.
XML's shorthand for an empty element (that is, one without contents), is ending the tag with a "/>".
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2005 11:53 PM
тАО01-18-2005 11:53 PM
Re: XML::Simple doesn't handle </tag> shorthand notation??
I experience tremendous difficulties getting XML::Parser's XS stubs linked against the libexpat.sl
But see my thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=791021
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2005 11:13 AM
тАО01-19-2005 11:13 AM
Re: XML::Simple doesn't handle </tag> shorthand notation??
still open. Perhaps it was oddly worded.
So I'll rephrase the question.
Q: Is there any option/trick/magic potion which will enable XML::Simple to parse this XML document:
alps(ted) 747>cat ugly.xml
alps(ted) 748>
without dying with an "unmatched tag" error??
If not, can I use XML::DOM or XML::XPath to parse it? (Sample code appreciated).
----
To answer the other question, I'm using a
pre-built perl which apparently is distributed with HP-UX standard now. It's built by ActiveState and lives in /opt/perl/bi/perl.
alps(ted) 751>/opt/perl/bin/perl -v
This is perl, v5.6.1 built for PA-RISC1.1-
Copyright 1987-2001, Larry Wall
Binary build 627 provided by ActiveState Tool Corp. http://www.ActiveState.com
Built 21:42:53 Jun 20 2001
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2005 08:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2005 09:01 PM
тАО01-19-2005 09:01 PM
Re: XML::Simple doesn't handle </tag> shorthand notation??
look like a definite:
http://www.perldoc.com/perl5.6.1/lib/XML/Simple.html#ERROR-HANDLING
states
"The XML standard is very clear on the issue of non-compliant documents. An error in parsing any single element (for example a missing end tag) must cause the whole document to be rejected. XML::Simple will die with an appropriate message if it encounters a parsing error."
Sorry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2005 04:58 AM
тАО01-20-2005 04:58 AM
Re: XML::Simple doesn't handle </tag> shorthand notation??
I'd thought the spec for an empty element
was to leave off the opening element.
I didn't realize (until Stepen so nicely
spelled it out) that the really syntax
is to have a bizarro element, where the
"/" is moved to the end of the element
instead of the FRONT of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2005 04:58 AM
тАО01-20-2005 04:58 AM