aspose file tools
The moose likes XML and Related Technologies and the fly likes including file paths in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "including file paths in XML" Watch "including file paths in XML" New topic
Author

including file paths in XML

Yell Srik
Ranch Hand

Joined: Mar 10, 2004
Posts: 61
Hi,
consider the code given below,
<?xml version="1.0" encoding="UTF-8"?>
<userchoice>
<user userID="Joe" pd="Soap" profession="student" level="user"> Sam </user>
<user userID="Dude" pd="Dude" profession="programmer" level="user"> Peter </user>
<user userID="James" pd="sunny skies" profession="sales" level="admin"> Martin </user>
</userchoice>
the above example XML file is a file from which data is read by a JSP page. in the above example, i want to know how is it possible to include a entire file instead of a name ie for example, is this right,
<user userID="D:\mydocuments\name.txt" pwd="Soap" profession="student" level="user"> Joe </user>
if it is wrong, how can represent an entire file path in a XML file.
thanks in advance.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The XML parser doesn't care what the attribute's value is (whether it's a file path, a random string, or a number) as long as the character's are legal. In short, the example you posted is perfectly valid XML.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: including file paths in XML
 
Similar Threads
How to update the xml tag attributes for the given tag
How to modify the XML Document?
Problem sending XML Data in soap request
question about AttributeList interface
How to read an XML file using JSP?