값 :다음은 기본적으로 그냥 XML 파일입니다 큰 FXG 파일에서 코드의 단지 snipplet입니다
<RichText x="14.1655" y="46.5674" columnGap="18" columnCount="1" textAlign="left" fontFamily="Bootstrap" color="#53836A" whiteSpaceCollapse="preserve" width="202.712" height="13.334" s7:caps="none" s7:colorName="" s7:colorValue="#B24FA41C" s7:colorspace="cmyk" s7:elementID="line1" s7:fill="true" s7:fillOverprint="false" s7:firstBaselineOffset="ascent" s7:joints="miter" s7:maxFontSize="12" s7:miterLimit="10" s7:referencePoint="inherit" s7:rowCount="1" s7:rowGap="18" s7:rowMajorOrder="true" s7:stroke="false" s7:strokeOverprint="false" s7:warpBend="0.5" s7:warpDirection="horizontal" s7:warpHorizontalDistortion="0" s7:warpStyle="none" s7:warpVerticalDistortion="0" s7:weight="1" ai:aa="2" ATE:C_charRotation="0" ATE:C_horizontalScale="1" ATE:C_kerning="metric" ATE:C_verticalScale="1" ATE:P_autoHyphenate="true" ATE:P_consecutiveHyphenLimit="0" ATE:P_hyphenateCapitalized="true" ATE:P_hyphenatedWordSize="6" ATE:P_hyphenationPreference="0.5" ATE:P_hyphenationZone="36" ATE:P_postHyphenSize="2" ATE:P_preHyphenSize="2" d:userLabel="id:line1">
<content><p><span>Address Line 1</span></p></content>
</RichText>
XML 파일의 노드 수있다 그 비슷한 구조를 가지고있다. 그러나 각 RichText
노드에는이 경우에 고유 한 요소 ID 인 s7:elementID="line1"
이 있습니다. 내가 잡을 수있는 방법을 PHP 또는 자바 스크립트를 사용
, 다음 중 하나를
- 텍스트 "주소 입력란 1"
- 내용, 페이지, 스팬 태그를 포함한 전체 라인
내가 지정하는 경우 elementID
콘텐츠를 원하십니까?
XML에 익숙하지 않아서 이것이 가능한지 확실하지 않습니다.
를 사용할 수 있습니다. – thindery
은 요소를 검색 할 RichText 노드를 정확하게 지정하는 방법입니다. 일반적으로 각 파일에는 5 또는 6 개의 RichText 노드가 있습니다. RichText 노드의 elementID를 기반으로 특정 항목을 가져와야합니다. 그게 가능합니까, 어떻게 든 id를 지정하면? – thindery
xpath에 대해 더 자세히 읽고, ('RichText [id = testid]') –