Monday, 9 February 2015

Is is possible tp split a string across multiple lines in an XML file?



I have the following segment of code in one of my Apache Ant build.xml files.



<property
name = "classpath"
value = "${dir_google_api_libs}/google-http-client-1.19.0.jar:"
"${dir_google_api_libs}/google-http-client-jackson2-1.19.0.jar:"
"${dir_google_api_libs}/jackson-core-2.1.3.jar"
/>


However, if I try invoke Apache Ant on this build.xml file, it (Ant) effectively complains about the string being split across multiple lines. The exact message it gives me is;


org.xml.sax.SAXParseException; systemId: file:/home/craig/source_code/java/Test_JsonFactory/build.xml; lineNumber: 78; columnNumber: 11; Element type "property" must be followed by either attribute specifications, ">" or "/>".


Does anybody know if there is a way to accomplish what I am trying to do, i.e. split the string across multiple lines? I detest having long lines like this in my build.xml files and find it much easier to analyse the code when it is vertically oriented and split across multiple lines.


Thanks in advance for any assistance.


No comments:

Post a Comment