Kyle X. wrote in post #992033:
> "Jess Gabriel y Galn" <jgabrielygalan / gmail.com> wrote in post
> #990433:
>>
>> I usually use Nokogiri to handle XML documents, and find css selectors>> easier than XPath. I'd do it like this:
>>
>> doc = Nokogiri::XML(<<END
>> <root xmlns:exp="http://foo" xmlns:xsi="http://bar">
>> <IfcWallStandardCase id="i1677">
>>  <ObjectPlacement>
>>    <IfcLocalPlacement xsi:nil="true" ref="i1671"/>
>>  </ObjectPlacement>
>> </IfcWallStandardCase>
>>
>> <IfcAxis2Placement3D id="i1671">
>>  <Location>
>>    <IfcCartesianPoint xsi:nil="true" ref="i1667"/>
>>  </Location>
>> </IfcAxis2Placement3D>
>>
>> <IfcCartesianPoint id="i1667">
>>  <Coordinates id="i1670" exp:cType="list">
>>    <IfcLengthMeasure exp:pos="0">117.4</IfcLengthMeasure>
>>    <IfcLengthMeasure exp:pos="1">119.7</IfcLengthMeasure>
>>    <IfcLengthMeasure exp:pos="2">0.</IfcLengthMeasure>
>>  </Coordinates>
>> </IfcCartesianPoint>
>> </root>
>> END
>> )
>>
>> reference = doc.css("#i1671 Location
>> IfcCartesianPoint").attribute("ref").value
>> doc.css("##{reference} Coordinates IfcLengthMeasure").map {|element|
>> element.text}
>>
>> This returns: => ["117.4", "119.7", "0."]

Please disregard the previous post.  I figured out how to load the
files, but it does not appear to be reading correctly.

Using-
fname = File.open("C:/Users/Kyle/Desktop/CSUF/Research Winter
11/IFXCML/automation trials/one.xml")
$doc = Nokogiri::XML(fname)
reference = $doc.css(" IfcCartesianPoint Coordinates
IfcLengthMeasure").first

This produce and output of nil when it should be "117.4" correct?  What
is going wrong here?