Reputation: 149
I have Autocad files .DXF or .DWG, I export them as XML files from Autocad. The files for example are for a house plan, with garden and pool... I need to be able to upload the xml file on a web application, then read each object, like the pool only, how can I detect where are the points of the pool in the xml file, using Javascript.
Was the question clear or you need more details?
Upvotes: 0
Views: 4251
Reputation: 408
-1. Which version of ACAD are you using? CIVIL?
This is the format for CIVIL I believe. But I could be wrong I only have Autocad 2011 standard.
http://www.landxml.org/webapps/landxmlsamples.aspx (samples)
More Info on ACAD XML See: http://images.autodesk.com/latin_am_main/files/2144863_Autodesk_WP_XML-at-Autodesk.pdf http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/How-To-Read-Xml-File/td-p/2377688
-2. Basically once you understand the ACAD XML format it's just a matter of searching through the XML file (text file)
see: http://snippets.dzone.com/posts/show/2719
see: search and output data from an XML file using JavaScript (advanced)
-3. Then just use Javascript to parse it into a HTML page. Website HTML file right?
<head>
<script type="text/javascript" src="loadxmldoc.js"></script>
</head>
<body>
<script type="text/javascript">
xmlDoc=loadXMLDoc("books.xml");
x=xmlDoc.getElementsByTagName("title")[0]
y=x.childNodes[0];
document.write(y.nodeValue);
</script>
</body>
</html>
Please give more details on your start format & end format. :)
This will also help to answer the question.
Upvotes: 1